From 9ba75fb0c4b92416b94640b5a043c323a457f14a Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Tue, 7 Jan 2014 16:56:07 +0800 Subject: [PATCH] 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 Signed-off-by: David S. Miller --- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 5 +++-- 1 file 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); -- 2.20.1