Re: [PATCH v2] HID: i2c-hid: Fixes "(null)" device name error logs in i2c_hid_parse
From: Doug Anderson <dianders@chromium.org>
Date: 2026-07-07 02:32:48
Also in:
lkml
From: Doug Anderson <dianders@chromium.org>
Date: 2026-07-07 02:32:48
Also in:
lkml
Hi, On Mon, Jul 6, 2026 at 6:54 PM Ai Chao [off-list ref] 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 Signed-off-by: Ai Chao <redacted> --- change for v2 - Used Fixes tag.
Could have fooled me. ;-) -Doug