diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2022-08-24 09:53:06 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-08-25 20:30:29 +0200 |
commit | 4b76dfbc44582a6cdf62eadb147f3a88f28de3dd (patch) | |
tree | 088f4c2df566fe857281fc97b02c790c04a5a0af /drivers/acpi/bus.c | |
parent | Linux 6.0-rc2 (diff) | |
download | linux-4b76dfbc44582a6cdf62eadb147f3a88f28de3dd.tar.xz linux-4b76dfbc44582a6cdf62eadb147f3a88f28de3dd.zip |
ACPI: bus: Remove the unneeded result variable
Return the value from driver_register() directly instead of storing it
in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r-- | drivers/acpi/bus.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index c0d20d997891..661a63ea3248 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -973,16 +973,13 @@ EXPORT_SYMBOL_GPL(acpi_driver_match_device); */ int acpi_bus_register_driver(struct acpi_driver *driver) { - int ret; - if (acpi_disabled) return -ENODEV; driver->drv.name = driver->name; driver->drv.bus = &acpi_bus_type; driver->drv.owner = driver->owner; - ret = driver_register(&driver->drv); - return ret; + return driver_register(&driver->drv); } EXPORT_SYMBOL(acpi_bus_register_driver); |