HID: lenovo: Add missing return-value check
authorJamie Lentin <jm@lentin.co.uk>
Tue, 11 Aug 2015 21:40:51 +0000 (22:40 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 12 Aug 2015 12:31:39 +0000 (14:31 +0200)
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-lenovo.c

index 680bb11dbdeea848ff38cb4019001071d1b796c9..d40221d781883fff8c98a6400ecff1540125a875 100644 (file)
@@ -207,9 +207,12 @@ static void lenovo_features_set_cptkbd(struct hid_device *hdev)
        struct lenovo_drvdata_cptkbd *cptkbd_data = hid_get_drvdata(hdev);
 
        ret = lenovo_send_cmd_cptkbd(hdev, 0x05, cptkbd_data->fn_lock);
-       ret = lenovo_send_cmd_cptkbd(hdev, 0x02, cptkbd_data->sensitivity);
        if (ret)
                hid_err(hdev, "Fn-lock setting failed: %d\n", ret);
+
+       ret = lenovo_send_cmd_cptkbd(hdev, 0x02, cptkbd_data->sensitivity);
+       if (ret)
+               hid_err(hdev, "Sensitivity setting failed: %d\n", ret);
 }
 
 static ssize_t attr_fn_lock_show_cptkbd(struct device *dev,