net/mlx4_en: Move spinlocks and work initalizations to beginning of init_netdev
authorEugenia Emantayev <eugenia@mellanox.com>
Mon, 27 Oct 2014 09:37:46 +0000 (11:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Oct 2014 21:18:01 +0000 (17:18 -0400)
commit207af6c5073021dfe32ae01d342a4dbf08e57515
tree1ece44e291837c2c1ee497796f24035dca9fad70
parentf4a36751584bbdfcfd6f3f232e0fe899763434a4
net/mlx4_en: Move spinlocks and work initalizations to beginning of init_netdev

Upon failures, destroy_netdev is called, and spinlocks/works must be
initialized before calling it. Otherwise kernel panic may occur.

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c