]> www.infradead.org Git - users/jedix/linux-maple.git/commit
e1000e: cleanup: use goto for common work needed by multiple exit points
authorBruce Allan <bruce.w.allan@intel.com>
Wed, 8 Feb 2012 02:54:42 +0000 (02:54 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 07:48:58 +0000 (15:48 +0800)
commit902111ca241d46a6a147892ad2dae73236f2de6e
treee891738d0e70a75686ae8156d2abf7a5e8fc6b19
parentb11a6437edae25c596f32582c6d7c6001922544a
e1000e: cleanup: use goto for common work needed by multiple exit points

There are two exit points of e1000e_write_nvm_spi() which require the
nvm->ops.release() function pointer called just before exiting.
Consolidate the two duplicate pieces of common work with a goto.  With
this change, the value ret_val will need to be returned instead of 0.

(cherry picked from commit ffacd472c4c577c9d39a97a1f7ac36f59443723b)
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/nvm.c