diff mbox series

[rdma-next,2/5] RDMA/bnxt_re: Remove unnecessary goto in bnxt_re_netdev_event

Message ID 1733888745-30939-3-git-send-email-selvin.xavier@broadcom.com (mailing list archive)
State New
Headers show
Series RDMA/bnxt_re: Minor code cleanups | expand

Commit Message

Selvin Xavier Dec. 11, 2024, 3:45 a.m. UTC
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

Return directly in case of error without a goto label as there
is no cleanup actions performed.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index 735bd78..ae5025b 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -2241,7 +2241,7 @@  static int bnxt_re_netdev_event(struct notifier_block *notifier,
 		real_dev = netdev;
 
 	if (real_dev != netdev)
-		goto exit;
+		return NOTIFY_DONE;
 
 	rdev = bnxt_re_from_netdev(real_dev);
 	if (!rdev)
@@ -2260,7 +2260,7 @@  static int bnxt_re_netdev_event(struct notifier_block *notifier,
 		break;
 	}
 	ib_device_put(&rdev->ibdev);
-exit:
+
 	return NOTIFY_DONE;
 }