HID: i2c-hid: show the error of failing to fetch the HID Descriptor
PATCH 1/1 HID: i2c-hid: show the error of 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.
Cc Barnabás Pőcze <[email protected]>
Signed-off-by Coiby Xu <[email protected]>
--- drivers/hid/i2c-hid/i2c-hid-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/hid/i2c-hid/i2c-hid-core.c +4 -1
@@ -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 )
Signature · 1 line
2.28.0
Quoted 6 lines · Coiby Xu
i2c_hid_probeshould notify the user of the error of failing to fetch the HID Descriptor instead of silently exiting.Cc Barnabás Pőcze <[email protected]>Signed-off-by Coiby Xu <[email protected]>
Applied, thank you.
Signature · 2 lines
Jiri Kosina SUSE Labs