Re: [PATCH v4] HID: i2c-hid: Fix "(null)" output when reading report descriptor fails
From: Jiri Kosina
Date: Mon Aug 03 2026 - 14:57:45 EST
On Thu, 16 Jul 2026, Ai Chao wrote:
> When i2c-hid fails to read the HID report descriptor during device
> initialization, the error message prints as:
>
> hid (null): reading report descriptor failed
>
> The HID device name is set in hid_add_device() after calling
> hdev->ll_driver->parse(), so when i2c_hid_parse() fails and calls
> hid_err(), the device name has not been set yet, resulting in "(null)"
> output.
>
> Use dev_err(&client->dev, ...) instead of hid_err(hid, ...) because
> the I2C client device is fully initialized with a proper name, providing
> meaningful error messages for debugging.
>
> Before: hid (null): reading report descriptor failed
> After: i2c_hid i2c-TPD0001:00: reading report descriptor failed
Applied, thanks.
--
Jiri Kosina
SUSE Labs