]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx5: Check for error return in flow_rule rather than err
authorColin Ian King <colin.king@canonical.com>
Fri, 12 Apr 2019 10:40:17 +0000 (11:40 +0100)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 12 Apr 2019 14:19:49 +0000 (11:19 -0300)
commit0aca25abd17ba82cb6256c636bbf8be44738dc0d
treee9b7deb46b877a440c9d14adf22aa4736f2cf133
parentaf0ebfcf9b930d5398ec2781ea97a30a827a00f1
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: 520ca61713ed ("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>
drivers/infiniband/hw/mlx5/qp.c