diff mbox series

[v1,3/5] ACPI: bus: Refactor acpi_bus_register_driver() to get rid of 'ret'

Message ID 20220825164103.27694-3-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,1/5] ACPI: bus: Drop kernel doc annotation from acpi_bus_notify() | expand

Commit Message

Andy Shevchenko Aug. 25, 2022, 4:41 p.m. UTC
There is no need to have 'ret' variable in acpi_bus_register_driver().
Refactor it accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/bus.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index c4d63c594d68..607e664b7976 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -972,16 +972,14 @@  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);