diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-04-12 11:40:17 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-04-12 11:19:49 -0300 |
commit | 1db86318c4d1a0d1c8a19535290f71a03a2f13ad (patch) | |
tree | e9b7deb46b877a440c9d14adf22aa4736f2cf133 /drivers/infiniband/hw/mlx5 | |
parent | 1c00d7bc96c2a4f5a8c8353705dec93bb036ad78 (diff) | |
download | lwn-1db86318c4d1a0d1c8a19535290f71a03a2f13ad.tar.gz lwn-1db86318c4d1a0d1c8a19535290f71a03a2f13ad.zip |
RDMA/mlx5: Check for error return in flow_rule rather than err
Currently when the call to create_flow_rule_vport_sq fails, the error
check is being performed on err rather than on the return pointer
flow_rule. The return flow_rule maybe NULL (which is not considered an
error) or an error code, so check for the error on flow_rule.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: d5ed8ac34cef ("RDMA/mlx5: Move default representors SQ steering to rule to modify QP")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5')
-rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index a970af0ffc3e..487dccbe1852 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -3276,7 +3276,7 @@ static int modify_raw_packet_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp, flow_rule = create_flow_rule_vport_sq(dev, sq, raw_qp_param->port); if (IS_ERR(flow_rule)) - return err; + return PTR_ERR(flow_rule); err = modify_raw_packet_qp_sq(dev->mdev, sq, sq_state, raw_qp_param, qp->ibqp.pd); |