hp-wireless: remove unneeded goto/label in hpwl_init
authorGiedrius Statkevičius <giedrius.statkevicius@gmail.com>
Sun, 23 Aug 2015 11:41:09 +0000 (14:41 +0300)
committerDarren Hart <dvhart@linux.intel.com>
Wed, 26 Aug 2015 06:34:15 +0000 (23:34 -0700)
acpi_bus_register_driver() already returns an appropriate value (0 on
success, and some negative value on error) to be used in __init functions
so the goto/label is redundant in hpwl_init thus remove it and directly
return the value

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/hp-wireless.c

index 4e4cc8bd7557d75f4c7aa76ffd2ed734ad54699a..988eedbd7c636e97a9708fc3b72d07ec2162e6cb 100644 (file)
@@ -114,14 +114,9 @@ static int __init hpwl_init(void)
 
        pr_info("Initializing HPQ6001 module\n");
        err = acpi_bus_register_driver(&hpwl_driver);
-       if (err) {
+       if (err)
                pr_err("Unable to register HP wireless control driver.\n");
-               goto error_acpi_register;
-       }
-
-       return 0;
 
-error_acpi_register:
        return err;
 }