aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHaggai Abramonvsky <hagaya@mellanox.com>2015-07-29 15:05:39 +0300
committerDavid S. Miller <davem@davemloft.net>2015-07-29 23:04:46 -0700
commitc928ed55171b3aa5e14a9474ffe60f31590b89ff (patch)
tree6e38ede4f6d5f597d3a178e9cba1d0f5ca019e7e /drivers
parentopenvswitch: Re-add CONFIG_OPENVSWITCH_VXLAN (diff)
downloadlinux-dev-c928ed55171b3aa5e14a9474ffe60f31590b89ff.tar.xz
linux-dev-c928ed55171b3aa5e14a9474ffe60f31590b89ff.zip
net/mlx5_core: Check the return value of mlx5_command_exec()
mlx5_cmd_exec() might fail - need to check return value. Signed-off-by: Haggai Abramovsky <hagaya@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
index fc88ecaecb4b..566a70488db1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
@@ -73,7 +73,12 @@ static inline int mlx5_cmd_exec_check_status(struct mlx5_core_dev *dev, u32 *in,
int in_size, u32 *out,
int out_size)
{
- mlx5_cmd_exec(dev, in, in_size, out, out_size);
+ int err;
+
+ err = mlx5_cmd_exec(dev, in, in_size, out, out_size);
+ if (err)
+ return err;
+
return mlx5_cmd_status_to_err((struct mlx5_outbox_hdr *)out);
}