bonding: populate essential new_slave->bond/dev early
authorVeaceslav Falico <vfalico@gmail.com>
Wed, 21 May 2014 15:42:00 +0000 (17:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 May 2014 19:46:34 +0000 (15:46 -0400)
The new bond_free_slave() needs new_slave->bond to verify if additional
structures were allocated, so populate it early so that, in case of failure
in bond_enslave(), we would be able to get it.

Also populate the new_slave->dev field, as it's too one of the most needed
things to assign early.

CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
Acked-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c

Simple merge