提交 0177f29f 编写于 作者: W Wei Yongjun 提交者: Rafael J. Wysocki

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 2efbca4d
...@@ -881,8 +881,10 @@ static int __init dock_add(acpi_handle handle) ...@@ -881,8 +881,10 @@ static int __init dock_add(acpi_handle handle)
status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
dock_notify_handler, dock_station); dock_notify_handler, dock_station);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status)) {
ret = -ENODEV;
goto err_rmgroup; goto err_rmgroup;
}
dock_station_count++; dock_station_count++;
list_add(&dock_station->sibling, &dock_stations); list_add(&dock_station->sibling, &dock_stations);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册