]> git.baikalelectronics.ru Git - kernel.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)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 13 Feb 2012 21:30:16 +0000 (13:30 -0800)
commitda955b38c867757b601019dbe80492a3e2ed2c14
tree1db95348f1fc1c5487f5dbecd01620a680c587c6
parentda57919f93f160cb5b00547da30fa9de6bd4ab91
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.

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>
drivers/net/ethernet/intel/e1000e/80003es2lan.c
drivers/net/ethernet/intel/e1000e/82571.c
drivers/net/ethernet/intel/e1000e/ich8lan.c
drivers/net/ethernet/intel/e1000e/mac.c
drivers/net/ethernet/intel/e1000e/manage.c
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/e1000e/nvm.c
drivers/net/ethernet/intel/e1000e/phy.c