]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: use return instead of goto
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>
Tue, 9 Feb 2016 10:37:46 +0000 (10:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2016 14:57:00 +0000 (09:57 -0500)
commita6c6022de32e46f321eccfbee85a052a5462bf04
tree4bf88800643ec885813d06a6d15fc5c66c3ce80f
parent18f5ab9d5ed0bce78fd67891154c717416700545
bonding: use return instead of goto

Replace 'goto' with 'return' to remove unnecessary check at label:
err_undo_flags.

The reason is that 'err_undo_flags' do two things for the first slave device:
1.revert bond mac address if it is set by the slave device.
2.revert bond device type if it's not ARPHRD_ETHER.

It's not necessary for the following three places, they changed neither bond
mac address nor type. It's straightforward to return directly.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c