From: Jamie Lentin <jm@lentin.co.uk>
To: Jiri Kosina <jkosina@suse.cz>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Jamie Lentin <jm@lentin.co.uk>
Subject: [PATCH 2/3] HID: lenovo: Add missing return-value check
Date: Tue, 11 Aug 2015 22:40:51 +0100 [thread overview]
Message-ID: <1439329252-16809-3-git-send-email-jm@lentin.co.uk> (raw)
In-Reply-To: <1439329252-16809-1-git-send-email-jm@lentin.co.uk>
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
next prev parent reply other threads:[~2015-08-11 21:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 21:40 [PATCH 0/3] HID: lenovo: Improve wheel emulation Jamie Lentin
2015-08-11 21:40 ` [PATCH 1/3] HID: lenovo: Use constants for axes names Jamie Lentin
2015-08-11 21:40 ` Jamie Lentin [this message]
2015-08-11 21:40 ` [PATCH 3/3] HID: lenovo: Hide middle-button press until release Jamie Lentin
2015-08-12 12:36 ` [PATCH 0/3] HID: lenovo: Improve wheel emulation Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439329252-16809-3-git-send-email-jm@lentin.co.uk \
--to=jm@lentin.co.uk \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).