ACPI: SBS: Simplify the driver init code
acpi_bus_register_driver() will check acpi_disable and return -ENODEV, so the acpi_disable check outside the acpi_bus_register_driver() is duplicated, can be removed. Also we can just return from acpi_bus_register_driver() then we can simplify the code further. Signed-off-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
ab5369bba5
commit
dff714087c
|
@ -714,16 +714,7 @@ static struct acpi_driver acpi_sbs_driver = {
|
||||||
|
|
||||||
static int __init acpi_sbs_init(void)
|
static int __init acpi_sbs_init(void)
|
||||||
{
|
{
|
||||||
int result = 0;
|
return acpi_bus_register_driver(&acpi_sbs_driver);
|
||||||
|
|
||||||
if (acpi_disabled)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
result = acpi_bus_register_driver(&acpi_sbs_driver);
|
|
||||||
if (result < 0)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit acpi_sbs_exit(void)
|
static void __exit acpi_sbs_exit(void)
|
||||||
|
|
Loading…
Reference in New Issue