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)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 13 Feb 2012 20:28:10 +0000 (12:28 -0800)
commitffacd472c4c577c9d39a97a1f7ac36f59443723b
tree819549eb8231b1d5c1a5711971ca30954a8881e5
parentfafdbf84d7eb2cd7aee435cc381a0796e1a5ccb0
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.

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/nvm.c