From: Eyal Perry Date: Wed, 14 May 2014 09:15:17 +0000 (+0300) Subject: net/mlx4_core: Fix inaccurate return value of mlx4_flow_attach() X-Git-Tag: next-20140516~66^2~11^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7572038409d0288ff5ba9c77a053ddec6791a43c;p=karo-tx-linux.git net/mlx4_core: Fix inaccurate return value of mlx4_flow_attach() 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 Signed-off-by: Amir Vadai Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c index 7c6eba622186..4c36def8e10f 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mcg.c +++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c @@ -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; }