[PATCH -next] ACPI / dock: fix error return code in dock_add()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxx>
---
 drivers/acpi/dock.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index f601658..b527c1b 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);

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux