* [PATCH] HID: i2c-hid: show the error of failing to fetch the HID Descriptor
@ 2020-10-21 14:33 Coiby Xu
2020-10-29 15:11 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Coiby Xu @ 2020-10-21 14:33 UTC (permalink / raw)
To: linux-input
Cc: Barnabás Pőcze, Jiri Kosina, Benjamin Tissoires, open list
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] HID: i2c-hid: show the error of failing to fetch the HID Descriptor
2020-10-21 14:33 [PATCH] HID: i2c-hid: show the error of failing to fetch the HID Descriptor Coiby Xu
@ 2020-10-29 15:11 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2020-10-29 15:11 UTC (permalink / raw)
To: Coiby Xu
Cc: linux-input, Barnabás Pőcze, Benjamin Tissoires, open list
On Wed, 21 Oct 2020, Coiby Xu wrote:
> 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>
Applied, thank you.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-29 15:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 14:33 [PATCH] HID: i2c-hid: show the error of failing to fetch the HID Descriptor Coiby Xu
2020-10-29 15:11 ` Jiri Kosina
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).