aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/queue.c
diff options
context:
space:
mode:
authorJack Wang <jinpu.wang@cloud.ionos.com>2021-02-16 15:38:07 +0100
committerJason Gunthorpe <jgg@nvidia.com>2021-02-16 20:01:56 -0400
commited408529679737a9a7ad816c8de5d59ba104bb11 (patch)
treeee39bb3934f28b0fafb4151c8909cce4ae0bb0b3 /drivers/mmc/core/queue.c
parentRDMA/srp: Fix support for unpopulated and unbalanced NUMA nodes (diff)
downloadlinux-dev-ed408529679737a9a7ad816c8de5d59ba104bb11.tar.xz
linux-dev-ed408529679737a9a7ad816c8de5d59ba104bb11.zip
RDMA/rtrs-srv: Do not pass a valid pointer to PTR_ERR()
smatch gives the warning: drivers/infiniband/ulp/rtrs/rtrs-srv.c:1805 rtrs_rdma_connect() warn: passing zero to 'PTR_ERR' Which is trying to say smatch has shown that srv is not an error pointer and thus cannot be passed to PTR_ERR. The solution is to move the list_add() down after full initilization of rtrs_srv. To avoid holding the srv_mutex too long, only hold it during the list operation as suggested by Leon. Fixes: 03e9b33a0fd6 ("RDMA/rtrs: Only allow addition of path to an already established session") Link: https://lore.kernel.org/r/20210216143807.65923-1-jinpu.wang@cloud.ionos.com Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/mmc/core/queue.c')
0 files changed, 0 insertions, 0 deletions