From: Coiby Xu Date: Wed, 21 Oct 2020 14:33:05 +0000 (+0800) Subject: HID: i2c-hid: show the error when failing to fetch the HID descriptor X-Git-Tag: v5.11-rc1~95^2~3^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=afdd34c5fa4028976ee5103ac499edbddedc813e;p=thirdparty%2Fkernel%2Flinux.git HID: i2c-hid: show the error when failing to fetch the HID descriptor 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 Signed-off-by: Coiby Xu Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c index 786e3e9af1c9e..577d324be16d0 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)