]> git.baikalelectronics.ru Git - kernel.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)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 13 Feb 2012 20:28:10 +0000 (12:28 -0800)
commit55c86514ad631266f31f94595c324c0110b3120b
tree819549eb8231b1d5c1a5711971ca30954a8881e5
parentc15d3cbe63ee76bdc479485ecefead8441f45540
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