On Fri, Feb 25, 2022 at 07:25:57PM +0800, Wenpeng Liang wrote: > hns_roce_alloc_cmd_mailbox() never returns NULL, so the check should be > IS_ERR(). Additionally, PTR_ERR() should be used to return an error code. > > Signed-off-by: Wenpeng Liang <liangwenpeng@xxxxxxxxxx> > --- > drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++-- > drivers/infiniband/hw/hns/hns_roce_mr.c | 8 +++----- > drivers/infiniband/hw/hns/hns_roce_srq.c | 4 ++-- > 3 files changed, 7 insertions(+), 9 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>