summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2026-03-27 11:52:08 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2026-03-31 13:13:47 +0200
commitf924224650e6e8fc79609218c5cf67d5988d733a (patch)
treee59ad721d49238beb4a60f76d8e3f3193bbe5f5e /drivers/mmc
parent5b8b35d6f4fa758dd5e8ae18526ea1c73f6787e0 (diff)
downloadlinux-next-f924224650e6e8fc79609218c5cf67d5988d733a.tar.gz
linux-next-f924224650e6e8fc79609218c5cf67d5988d733a.zip
mmc: vub300: clean up module init
Clean up module init by dropping redundant error messages (e.g. allocation and USB driver registration failure will already have been logged) and naming error labels after what they do. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/vub300.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index 3057a69ff8c4..6c3cb2f1c9d3 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -2429,37 +2429,36 @@ static int __init vub300_init(void)
pr_info("VUB300 Driver rom wait states = %02X irqpoll timeout = %04X",
firmware_rom_wait_states, 0x0FFFF & firmware_irqpoll_timeout);
+
cmndworkqueue = create_singlethread_workqueue("kvub300c");
- if (!cmndworkqueue) {
- pr_err("not enough memory for the REQUEST workqueue");
- result = -ENOMEM;
- goto out1;
- }
+ if (!cmndworkqueue)
+ return -ENOMEM;
+
pollworkqueue = create_singlethread_workqueue("kvub300p");
if (!pollworkqueue) {
- pr_err("not enough memory for the IRQPOLL workqueue");
result = -ENOMEM;
- goto out2;
+ goto err_destroy_cmdwq;
}
+
deadworkqueue = create_singlethread_workqueue("kvub300d");
if (!deadworkqueue) {
- pr_err("not enough memory for the EXPIRED workqueue");
result = -ENOMEM;
- goto out3;
+ goto err_destroy_pollwq;
}
+
result = usb_register(&vub300_driver);
- if (result) {
- pr_err("usb_register failed. Error number %d", result);
- goto out4;
- }
+ if (result)
+ goto err_destroy_deadwq;
+
return 0;
-out4:
+
+err_destroy_deadwq:
destroy_workqueue(deadworkqueue);
-out3:
+err_destroy_pollwq:
destroy_workqueue(pollworkqueue);
-out2:
+err_destroy_cmdwq:
destroy_workqueue(cmndworkqueue);
-out1:
+
return result;
}