summaryrefslogtreecommitdiff
path: root/drivers/staging/qlge
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2021-09-22 11:58:03 +0300
committerDavid S. Miller <davem@davemloft.net>2021-09-22 16:15:12 +0300
commitdb4278c55fa53760893266538e86e638330b03bb (patch)
treec2b028bf752e268e9a85791aa199db4f559b80be /drivers/staging/qlge
parent07b855628c226511542d0911cba1b180541fbb84 (diff)
downloadlinux-db4278c55fa53760893266538e86e638330b03bb.tar.xz
devlink: Make devlink_register to be void
devlink_register() can't fail and always returns success, but all drivers are obligated to check returned status anyway. This adds a lot of boilerplate code to handle impossible flow. Make devlink_register() void and simplify the drivers that use that API call. Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Acked-by: Simon Horman <simon.horman@corigine.com> Acked-by: Vladimir Oltean <olteanv@gmail.com> # dsa Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/staging/qlge')
-rw-r--r--drivers/staging/qlge/qlge_main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 8fcdf89da8aa..33539f6c254d 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -4614,12 +4614,8 @@ static int qlge_probe(struct pci_dev *pdev,
goto netdev_free;
}
- err = devlink_register(devlink);
- if (err)
- goto netdev_free;
-
+ devlink_register(devlink);
err = qlge_health_create_reporters(qdev);
-
if (err)
goto devlink_unregister;