]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/rdmavt: Delete unnecessary NULL check
authorNatalia Petrova <n.petrova@fintech.ru>
Fri, 3 Mar 2023 12:44:08 +0000 (15:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:11:26 +0000 (23:11 +0900)
commit0157371ed1bd5fc51a7818c1bfb68238c025103e
treeb31de22011cb1774dfda0290b526c0b2606aaccb
parent2f131500cf461e5c67b70a3957e8b3547cd7d909
RDMA/rdmavt: Delete unnecessary NULL check

[ Upstream commit b73a0b80c69de77d8d4942abb37066531c0169b2 ]

There is no need to check 'rdi->qp_dev' for NULL. The field 'qp_dev'
is created in rvt_register_device() which will fail if the 'qp_dev'
allocation fails in rvt_driver_qp_init(). Overwise this pointer
doesn't changed and passed to rvt_qp_exit() by the next step.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 0acb0cc7ecc1 ("IB/rdmavt: Initialize and teardown of qpn table")
Signed-off-by: Natalia Petrova <n.petrova@fintech.ru>
Link: https://lore.kernel.org/r/20230303124408.16685-1-n.petrova@fintech.ru
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/rdmavt/qp.c