[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220825164103.27694-3-andriy.shevchenko@linux.intel.com>
Date: Thu, 25 Aug 2022 19:41:01 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>
Subject: [PATCH v1 3/5] ACPI: bus: Refactor acpi_bus_register_driver() to get rid of 'ret'
There is no need to have 'ret' variable in acpi_bus_register_driver().
Refactor it accordingly.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
drivers/acpi/bus.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
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);
--
2.35.1
Powered by blists - more mailing lists