Skip to content

Commit

Permalink
HID: i2c-hid: show the error when failing to fetch the HID descriptor
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Coiby Xu authored and Jiri Kosina committed Oct 29, 2020
1 parent bf36c6b commit afdd34c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/hid/i2c-hid/i2c-hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit afdd34c

Please sign in to comment.