From: Wei Yongjun Date: Tue, 7 Jan 2014 08:56:07 +0000 (+0800) Subject: net/mlx4_en: fix error return code in mlx4_en_get_qp() X-Git-Tag: accepted/tizen/common/20141203.182822~719^2~260 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ba75fb0c4b92416b94640b5a043c323a457f14a;p=platform%2Fkernel%2Flinux-arm64.git 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 --- diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index 60b927e..fad4531 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);