aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-07-16 20:33:25 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-25 18:34:00 -0400
commit0177f29fea534ef5e6af2d76e9a9be0fdd325c4d (patch)
treee1a7db8e94217cf39cb5c9193305f0149fd3f6c9
parent2efbca4dfc7b43951de6dd1647f9eebda9d4372b (diff)
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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/dock.c4
1 files changed, 3 insertions, 1 deletions
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)
881 881
882 status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, 882 status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
883 dock_notify_handler, dock_station); 883 dock_notify_handler, dock_station);
884 if (ACPI_FAILURE(status)) 884 if (ACPI_FAILURE(status)) {
885 ret = -ENODEV;
885 goto err_rmgroup; 886 goto err_rmgroup;
887 }
886 888
887 dock_station_count++; 889 dock_station_count++;
888 list_add(&dock_station->sibling, &dock_stations); 890 list_add(&dock_station->sibling, &dock_stations);