]> www.infradead.org Git - users/jedix/linux-maple.git/commit
e1000e: cleanup goto statements to exit points without common work
authorBruce Allan <bruce.w.allan@intel.com>
Wed, 8 Feb 2012 02:55:56 +0000 (02:55 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 07:50:24 +0000 (15:50 +0800)
commitd0bd4a3d84e6cde2a6d4dbb95531893afe4c8058
treea152eaa8e86bf01d0e1540777d1d90f86c3f2043
parent512aa5a572570a18bd65885ca3657d3734ae2127
e1000e: cleanup goto statements to exit points without common work

Per ./Documentation/CodingStyle, goto statements are acceptable for the
centralized exiting of functions when there are multiple exit points which
share common work such as cleanup.  When no common work is required for
multiple exit points, the function should just return at these exit points
instead of doing an unnecessary jump to a centralized return.  This patch
cleans up the inappropriate use of goto statements, and removes unnecessary
variables (or move to a smaller scope) where possible as a result of the
cleanups.

(cherry picked from commit 5015e53a4cf0c88977120faede7eb02b0459d90e)
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/e1000e/80003es2lan.c
drivers/net/e1000e/82571.c
drivers/net/e1000e/ich8lan.c
drivers/net/e1000e/mac.c
drivers/net/e1000e/manage.c
drivers/net/e1000e/netdev.c
drivers/net/e1000e/nvm.c
drivers/net/e1000e/phy.c