net/mlx4_core: Fix inaccurate return value of mlx4_flow_attach()
authorEyal Perry <eyalpe@mellanox.com>
Wed, 14 May 2014 09:15:17 +0000 (12:15 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 May 2014 19:40:34 +0000 (15:40 -0400)
Adopt the "info: why not propagate 'ret' from parse_trans_rule()..."
suggestion made by the smatch semantic checker on:
drivers/net/ethernet/mellanox/mlx4/mcg.c:867 mlx4_flow_attach()

Signed-off-by: Eyal Perry <eyalpe@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/mcg.c

index 7c6eba622186796f884b175f5dc7a96363101126..4c36def8e10f9b518a1ba8a3f05340eb63c4dc0a 100644 (file)
@@ -897,7 +897,7 @@ int mlx4_flow_attach(struct mlx4_dev *dev,
                ret = parse_trans_rule(dev, cur, mailbox->buf + size);
                if (ret < 0) {
                        mlx4_free_cmd_mailbox(dev, mailbox);
-                       return -EINVAL;
+                       return ret;
                }
                size += ret;
        }