Commit e5ed878d authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Rafael J. Wysocki

ACPI: bus: Drop redundant check in acpi_device_remove()

A bus remove callback is only ever called by the device core with a
bound driver. So there is no need to check if the driver is non-NULL.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
[ rjw: Added empty code line after if () ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent dfc17f6e
......@@ -1062,12 +1062,12 @@ static void acpi_device_remove(struct device *dev)
struct acpi_device *acpi_dev = to_acpi_device(dev);
struct acpi_driver *acpi_drv = acpi_dev->driver;
if (acpi_drv) {
if (acpi_drv->ops.notify)
acpi_device_remove_notify_handler(acpi_dev);
if (acpi_drv->ops.remove)
acpi_drv->ops.remove(acpi_dev);
}
if (acpi_drv->ops.notify)
acpi_device_remove_notify_handler(acpi_dev);
if (acpi_drv->ops.remove)
acpi_drv->ops.remove(acpi_dev);
acpi_dev->driver = NULL;
acpi_dev->driver_data = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment