RDMA/iw_cxgb4: Fix the unchecked ep dereference
authorRaju Rangoju <rajur@chelsio.com>
Fri, 11 Jan 2019 14:57:18 +0000 (20:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:12 +0000 (14:50 +0100)
commit05598b96701a915972ca4662d32f7eaf6dceec39
tree8c4cae1cf921a83dd059a0035dd7928d6c352370
parentce519d838622bfed7eeeb7a87310c9732998bde3
RDMA/iw_cxgb4: Fix the unchecked ep dereference

[ Upstream commit 3352976c892301fd576a2e9ff0ac7337b2e2ca48 ]

The patch 944661dd97f4: "RDMA/iw_cxgb4: atomically lookup ep and get a
reference" from May 6, 2016, leads to the following Smatch complaint:

    drivers/infiniband/hw/cxgb4/cm.c:2953 terminate()
    error: we previously assumed 'ep' could be null (see line 2945)

Fixes: 944661dd97f4 ("RDMA/iw_cxgb4: atomically lookup ep and get a reference")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Raju Rangoju <rajur@chelsio.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/cxgb4/cm.c