Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1205465

[PATCH 2/3] HID: lenovo: Add missing return-value check

From Jamie Lentin <jm@lentin.co.uk>
Newsgroups linux.kernel
Subject [PATCH 2/3] HID: lenovo: Add missing return-value check
Date 2015-08-12 00:30 +0200
Message-ID <pWqds-1LO-11@gated-at.bofh.it> (permalink)
References <pWq3L-1AD-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
 drivers/hid/hid-lenovo.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index 65df414..265bfe2 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -178,9 +178,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,
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] HID: lenovo: Improve wheel emulation Jamie Lentin <jm@lentin.co.uk> - 2015-08-12 00:20 +0200
  [PATCH 2/3] HID: lenovo: Add missing return-value check Jamie Lentin <jm@lentin.co.uk> - 2015-08-12 00:30 +0200
  [PATCH 1/3] HID: lenovo: Use constants for axes names Jamie Lentin <jm@lentin.co.uk> - 2015-08-12 00:30 +0200
  Re: [PATCH 0/3] HID: lenovo: Improve wheel emulation Jiri Kosina <jikos@kernel.org> - 2015-08-12 14:40 +0200

csiph-web