hp_wireless: Inform the user if hp_wireless_input_setup()/add() fails
authorGiedrius Statkevicius <giedriuswork@gmail.com>
Fri, 28 Nov 2014 22:14:27 +0000 (00:14 +0200)
committerDarren Hart <dvhart@linux.intel.com>
Wed, 3 Dec 2014 18:10:15 +0000 (10:10 -0800)
In hpwl_add() there is a unused variable err to which we assign the
result of hp_wireless_input_setup() but we don't do anything depending
on the result so print out a message that informs the user if add()
(hp_wireless_input_setup()) fails since acpi_device_probe() doesn't
print anything in this case.

Signed-off-by: Giedrius Statkevicius <giedriuswork@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/hp-wireless.c

index 415348fc1210367ec52eec232b22c5d195a60572..4e4cc8bd7557d75f4c7aa76ffd2ed734ad54699a 100644 (file)
@@ -85,6 +85,9 @@ static int hpwl_add(struct acpi_device *device)
        int err;
 
        err = hp_wireless_input_setup();
+       if (err)
+               pr_err("Failed to setup hp wireless hotkeys\n");
+
        return err;
 }