Re: [PATCH] RDMA/rtrs-srv: Suppress warnings passing zero to 'PTR_ERR'

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

 



On Tue, Feb 16, 2021 at 03:38:07PM +0100, Jack Wang wrote:
> smatch warnings:
> drivers/infiniband/ulp/rtrs/rtrs-srv.c:1805 rtrs_rdma_connect() warn: passing zero to 'PTR_ERR'
> 
> Smatch seems confused by the refcount_read condition, the solution is
> protect move the list_add down after full initilization of rtrs_srv.

In theory if Smatch had a properly up to date DB then it would print a
different warning "passing a valid pointer to PTR_ERR()".

regards,
dan carpenter




[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