hwmon: (acpi_power_meter) Use return value from acpi_bus_register_driver
authorGuenter Roeck <linux@roeck-us.net>
Fri, 13 Sep 2013 17:56:11 +0000 (10:56 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 13 Oct 2013 23:16:26 +0000 (16:16 -0700)
acpi_bus_register_driver() returns a valid error code. Use it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/acpi_power_meter.c

index 51b045b20c1a2753015f1d1a1cc3f6f519cdbd4a..8d40da314a8e5bf5b424a5039e4279ba819433d1 100644 (file)
@@ -996,7 +996,7 @@ static int __init acpi_power_meter_init(void)
 
        result = acpi_bus_register_driver(&acpi_power_meter_driver);
        if (result < 0)
-               return -ENODEV;
+               return result;
 
        return 0;
 }