From: Coiby Xu <coiby.xu@gmail.com>
To: linux-input@vger.kernel.org
Cc: "Barnabás Pőcze" <pobrn@protonmail.com>,
"Jiri Kosina" <jikos@kernel.org>,
"Benjamin Tissoires" <benjamin.tissoires@redhat.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] HID: i2c-hid: show the error of failing to fetch the HID Descriptor
Date: Wed, 21 Oct 2020 22:33:05 +0800 [thread overview]
Message-ID: <20201021143305.475182-1-coiby.xu@gmail.com> (raw)
i2c_hid_probe should notify the user of the error of failing to fetch
the HID Descriptor instead of silently exiting.
Link: https://forum.manjaro.org/t/elan-touchpad-working-in-live-but-not-in-native-os/31860/55
Cc: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
drivers/hid/i2c-hid/i2c-hid-core.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 786e3e9af1c9..577d324be16d 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -1099,8 +1099,11 @@ static int i2c_hid_probe(struct i2c_client *client,
}
ret = i2c_hid_fetch_hid_descriptor(ihid);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(&client->dev,
+ "Failed to fetch the HID Descriptor\n");
goto err_regulator;
+ }
ret = i2c_hid_init_irq(client);
if (ret < 0)
--
2.28.0
next reply other threads:[~2020-10-21 14:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 14:33 Coiby Xu [this message]
2020-10-29 15:11 ` [PATCH] HID: i2c-hid: show the error of failing to fetch the HID Descriptor 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=20201021143305.475182-1-coiby.xu@gmail.com \
--to=coiby.xu@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pobrn@protonmail.com \
/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).