]> Git Repo - linux.git/blobdiff - drivers/memstick/core/memstick.c
arm64: Use a variable to store non-global mappings decision
[linux.git] / drivers / memstick / core / memstick.c
index 6cfb293396f2c4639c08bd11d5b0e744bef1d596..693ee73eb2912c05abdbfbe4955757cc767c0731 100644 (file)
@@ -625,13 +625,18 @@ static int __init memstick_init(void)
                return -ENOMEM;
 
        rc = bus_register(&memstick_bus_type);
-       if (!rc)
-               rc = class_register(&memstick_host_class);
+       if (rc)
+               goto error_destroy_workqueue;
 
-       if (!rc)
-               return 0;
+       rc = class_register(&memstick_host_class);
+       if (rc)
+               goto error_bus_unregister;
+
+       return 0;
 
+error_bus_unregister:
        bus_unregister(&memstick_bus_type);
+error_destroy_workqueue:
        destroy_workqueue(workqueue);
 
        return rc;
This page took 0.034215 seconds and 4 git commands to generate.