]> git.ipfire.org Git - thirdparty/linux.git/commit
i2c: core: Check for error pointer for fwnode
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 12 Jan 2026 13:22:40 +0000 (14:22 +0100)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 14 Jan 2026 07:02:20 +0000 (08:02 +0100)
commit1a1c74b66af815c5eacf73d5ec6e79e21e102fcf
treeb82d389aa4c210e160479bcbe201bbc7c3d891a2
parentaa1292d109a65c9145e3311057ee28098fad78a8
i2c: core: Check for error pointer for fwnode

Theoretically it's possible that fwnode is returned by some API,
that may return an error pointer (and we have, for example,
fwnode_find_reference() which does that). If such an fwnode
is supplied to the i2c core APIs the functions will perform
unneeded loops and checks. Avoid this by preventively checking
for an error pointer and bail out immediately.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-core-base.c