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