diff options
| author | Ai Chao <aichao@kylinos.cn> | 2026-07-16 19:29:32 +0800 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-08-03 20:52:06 +0200 |
| commit | 8da0f0951deec9f0728ed2d9c54ded1c344b7542 (patch) | |
| tree | 3dc0e2fd62b6034d46a07f34d019bb84df42a4b8 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | f70a82e20d01215a95d82557c9c8dc638581e5c0 (diff) | |
HID: i2c-hid: Fix "(null)" output when reading report descriptor fails
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
Fixes: 4a200c3b9a40 ("HID: i2c-hid: introduce HID over i2c specification implementation")
Signed-off-by: Ai Chao <aichao@kylinos.cn>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
