Skip to content

Commit 4b76dfb

Browse files
ye xingchenrafaeljw
authored andcommitted
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 <[email protected]> Signed-off-by: ye xingchen <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 1c23f9e commit 4b76dfb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/acpi/bus.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -973,16 +973,13 @@ EXPORT_SYMBOL_GPL(acpi_driver_match_device);
973973
*/
974974
int acpi_bus_register_driver(struct acpi_driver *driver)
975975
{
976-
int ret;
977-
978976
if (acpi_disabled)
979977
return -ENODEV;
980978
driver->drv.name = driver->name;
981979
driver->drv.bus = &acpi_bus_type;
982980
driver->drv.owner = driver->owner;
983981

984-
ret = driver_register(&driver->drv);
985-
return ret;
982+
return driver_register(&driver->drv);
986983
}
987984

988985
EXPORT_SYMBOL(acpi_bus_register_driver);

0 commit comments

Comments
 (0)