diff options
author | Kalesh AP <kalesh-anakkur.purayil@broadcom.com> | 2024-04-09 14:54:26 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-04-10 19:55:05 -0700 |
commit | 43226dccd1bd74c6bf97d8d357e782f4922d39e3 (patch) | |
tree | ddb0d7c76d142a4db003bca5690975d01f12c611 /drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | |
parent | 17b0dfa1f35bf58c17ae75da4af99e6b2c51ed57 (diff) | |
download | linux-43226dccd1bd74c6bf97d8d357e782f4922d39e3.tar.gz linux-43226dccd1bd74c6bf97d8d357e782f4922d39e3.tar.bz2 linux-43226dccd1bd74c6bf97d8d357e782f4922d39e3.zip |
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: Vikas Gupta <vikas.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20240409215431.41424-3-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c index 86dcd2c76587..fd890819d4bc 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c @@ -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); |