net/mlx4_core: Return proper error code when __mlx4_add_one fails
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Thu, 24 Jan 2013 01:54:17 +0000 (01:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2013 05:13:57 +0000 (00:13 -0500)
commitf356fcbe12c1174713e83651b630330f8f0f8415
tree8e5582ef389f5567b764806f175477162415f50c
parentdbd501a80671180a8f3cdf93ca465959031fef18
net/mlx4_core: Return proper error code when __mlx4_add_one fails

Returning 0 (success) when in fact we are aborting the load, leads to kernel
panic when unloading the module. Fix that by returning the actual error code.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
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/main.c