Commit afdd34c5 authored by Coiby Xu's avatar Coiby Xu Committed by Jiri Kosina
Browse files

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 <pobrn@protonmail.com>
Signed-off-by: default avatarCoiby Xu <coiby.xu@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent bf36c6b9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)