Re: [PATCH v2 for-next 7/9] RDMA/hns: Clean up the return value check of hns_roce_alloc_cmd_mailbox()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux