diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2014-01-07 16:56:07 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-07 15:42:52 -0500 |
commit | 9ba75fb0c4b92416b94640b5a043c323a457f14a (patch) | |
tree | ce84265af6cd2ae358b21842adb10b3b045b77d6 /drivers/net | |
parent | 4a8deae2f46533e7dd482615e9dfd224d4e97eb0 (diff) |
net/mlx4_en: fix error return code in mlx4_en_get_qp()
Fix to return a negative error code from the error handling
case instead of 0.
Fixes: 837052d0ccc5 ('net/mlx4_en: Add netdev support for TCP/IP offloads of vxlan tunneling')
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index 60b927eab2b1..fad45316200a 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -632,8 +632,9 @@ static int mlx4_en_get_qp(struct mlx4_en_priv *priv) if (err) goto steer_err; - if (mlx4_en_tunnel_steer_add(priv, priv->dev->dev_addr, *qpn, - &priv->tunnel_reg_id)) + err = mlx4_en_tunnel_steer_add(priv, priv->dev->dev_addr, *qpn, + &priv->tunnel_reg_id); + if (err) goto tunnel_err; entry = kmalloc(sizeof(*entry), GFP_KERNEL); |