Re: [PATCH v4 2/3] hwmon: (emc1403) Convert to use OF bindings
[email protected] Fri, 31 Jul 2026 11:41:28 +0000
| Newsgroups | org.kernel.vger.linux-hwmon,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Low] The OF match data for 'smsc,emc1402' is set to the enum value `emc1= 402` (0). This results in a NULL pointer, causing `device_get_match_data()`= to incorrectly assume the match data is missing, which triggers an uninten= ded fallback to `id_table` matching. -- --- Patch [2]: [PATCH v4 2/3] hwmon: (emc1403) Convert to use OF bindings -= -- Note: The standard inline diff format for this report has been altered to a free-form summary due to automated recitation restrictions. commit 6847b2cd06e049585ee05391183122e70ebf54a0 Author: Jonas Schw=C3=B6bel <[email protected]> hwmon: (emc1403) Convert to use OF bindings This commit adds an OF match table to the emc1403 driver to enable its use with Device Trees. [Severity: Low] Looking at emc1403_of_match in drivers/hwmon/emc1403.c, the .data field for "smsc,emc1402" is cast from the enum emc1402. Since emc1402 evaluates to 0, does this store a NULL pointer in the match data? When emc1403_probe() calls i2c_get_match_data(client) at line 668, device_get_match_data() will encounter this NULL pointer and assume the match data is missing. Will this cause the I2C subsystem to unintentionally bypass the OF match data and fall back to string matching against the id_table? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260731113007.1453= [email protected]?part=3D2