Skip to content

Commit

Permalink
HID: lenovo: Add missing return-value check
Browse files Browse the repository at this point in the history
Signed-off-by: Jamie Lentin <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
lentinj authored and Jiri Kosina committed Aug 12, 2015
1 parent 7f65068 commit dbfebb4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/hid/hid-lenovo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dbfebb4

Please sign in to comment.