]> git.baikalelectronics.ru Git - kernel.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>
Wed, 17 May 2023 09:35:50 +0000 (11:35 +0200)
commit15ace20d997b99e78b9590b8eb904a24aa875c33
tree4e27d5e2d254be29f23a2865f702683d2f89b64a
parentace9205e71d20ce031017231e769b30e61f1a8f2
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: d79dc839bc5d ("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