diff options
| author | Kalesh AP <[email protected]> | 2024-12-11 03:45:43 +0000 |
|---|---|---|
| committer | Leon Romanovsky <[email protected]> | 2024-12-16 13:22:06 +0000 |
| commit | 55992c386263f3899552118b2e3d142cd223eba4 (patch) | |
| tree | 72785c76682f27b5d207ba29a8d699e0368a038c /drivers/infiniband/hw/bnxt_re/main.c | |
| parent | RDMA/bnxt_re: Remove unnecessary goto in bnxt_re_netdev_event (diff) | |
| download | kernel-55992c386263f3899552118b2e3d142cd223eba4.tar.gz kernel-55992c386263f3899552118b2e3d142cd223eba4.zip | |
RDMA/bnxt_re: Optimize error handling in bnxt_re_probe
Optimize error handling path in bnxt_re_probe by removing
some duplicate code.
Signed-off-by: Kalesh AP <[email protected]>
Signed-off-by: Selvin Xavier <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/main.c')
| -rw-r--r-- | drivers/infiniband/hw/bnxt_re/main.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index ae5025b09282..75e1611fc3ed 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -2321,13 +2321,9 @@ static int bnxt_re_probe(struct auxiliary_device *adev, rc = bnxt_re_add_device(adev, BNXT_RE_COMPLETE_INIT); if (rc) - goto err; - mutex_unlock(&bnxt_re_mutex); - return 0; + kfree(en_info); -err: mutex_unlock(&bnxt_re_mutex); - kfree(en_info); return rc; } |
