[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211012231520.72582-1-snelson@pensando.io>
Date: Tue, 12 Oct 2021 16:15:20 -0700
From: Shannon Nelson <snelson@...sando.io>
To: davem@...emloft.net, netdev@...r.kernel.org, kuba@...nel.org
Cc: drivers@...sando.io, Shannon Nelson <snelson@...sando.io>,
Leon Romanovsky <leonro@...dia.com>
Subject: [PATCH net-next] ionic: no devlink_unregister if not registered
Don't try to unregister the devlink if it hasn't been registered
yet. This bit of error cleanup code got missed in the recent
devlink registration changes.
Fixes: 7911c8bd546f ("ionic: Move devlink registration to be last devlink command")
Cc: Leon Romanovsky <leonro@...dia.com>
Signed-off-by: Shannon Nelson <snelson@...sando.io>
---
drivers/net/ethernet/pensando/ionic/ionic_devlink.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_devlink.c b/drivers/net/ethernet/pensando/ionic/ionic_devlink.c
index 2267da95640b..4297ed9024c0 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_devlink.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_devlink.c
@@ -87,7 +87,6 @@ int ionic_devlink_register(struct ionic *ionic)
err = devlink_port_register(dl, &ionic->dl_port, 0);
if (err) {
dev_err(ionic->dev, "devlink_port_register failed: %d\n", err);
- devlink_unregister(dl);
return err;
}
--
2.17.1
Powered by blists - more mailing lists