Commit 43226dcc authored by Kalesh AP's avatar Kalesh AP Committed by Jakub Kicinski

bnxt_en: Remove a redundant NULL check in bnxt_register_dev()

The memory for "edev->ulp_tbl" is allocated inside the
bnxt_rdma_aux_device_init() function. If it fails, the driver
will not create the auxiliary device for RoCE. Hence the NULL
check inside bnxt_register_dev() is unnecessary.
Reviewed-by: default avatarVikas Gupta <vikas.gupta@broadcom.com>
Reviewed-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: default avatarKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20240409215431.41424-3-michael.chan@broadcom.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 17b0dfa1
......@@ -64,9 +64,6 @@ int bnxt_register_dev(struct bnxt_en_dev *edev,
return -ENOMEM;
ulp = edev->ulp_tbl;
if (!ulp)
return -ENOMEM;
ulp->handle = handle;
rcu_assign_pointer(ulp->ulp_ops, ulp_ops);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment