]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net/mlx4_en: fix error return code in mlx4_en_get_qp()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 7 Jan 2014 08:56:07 +0000 (16:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jan 2014 20:42:52 +0000 (15:42 -0500)
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>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

index 60b927eab2b1b0ee94f706f5f7f1e41732623fc3..fad45316200aa0fbcb115e3f6b4ec56a24ca29cd 100644 (file)
@@ -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);