Commit d1f24712 authored by Shannon Nelson's avatar Shannon Nelson Committed by Jakub Kicinski

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: 7911c8bd ("ionic: Move devlink registration to be last devlink command")
Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20211012231520.72582-1-snelson@pensando.ioSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0e258cec
......@@ -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;
}
......
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