]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Fix return value check in flow_counters_set_data()
authorweiyongjun (A) <weiyongjun1@huawei.com>
Thu, 7 Jun 2018 01:47:41 +0000 (01:47 +0000)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 11 Jun 2018 17:02:27 +0000 (11:02 -0600)
commit76a36f02b10d06276747f345ef6a1cbf1cdb7f06
tree85d63b0103e44a17eae35f2d06c331d9b8d113c6
parentc01721ba29fc2f196c09d4d94582d17dece541df
IB/mlx5: Fix return value check in flow_counters_set_data()

In case of error, the function mlx5_fc_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

Fixes: 5f57985317bf ("IB/mlx5: Add flow counters binding support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c