From: Wei Yongjun Date: Wed, 17 Jul 2013 00:33:25 +0000 (+0800) Subject: ACPI / dock: fix error return code in dock_add() X-Git-Tag: MMI-PSA29.97-13-9~13773^2~17^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0177f29fea534ef5e6af2d76e9a9be0fdd325c4d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ACPI / dock: fix error return code in dock_add() Fix to return -ENODEV in the acpi notify handler install error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index f601658a4ad2..b527c1bd8bb2 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -881,8 +881,10 @@ static int __init dock_add(acpi_handle handle) status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, dock_notify_handler, dock_station); - if (ACPI_FAILURE(status)) + if (ACPI_FAILURE(status)) { + ret = -ENODEV; goto err_rmgroup; + } dock_station_count++; list_add(&dock_station->sibling, &dock_stations);