]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
i2c: muxes: mule: Fix an error handling path in mule_i2c_mux_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 30 Jul 2025 19:38:02 +0000 (21:38 +0200)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Sun, 3 Aug 2025 20:47:57 +0000 (22:47 +0200)
commit33ac5155891cab165c93b51b0e22e153eacc2ee7
treebcbc107b9f4cdf280c19703a140d093e3eb0f48e
parent0b7c9528facdb5a73ad78fea86d2e95a6c48dbc4
i2c: muxes: mule: Fix an error handling path in mule_i2c_mux_probe()

If an error occurs in the loop that creates the device adapters, then a
reference to 'dev' still needs to be released.

Use for_each_child_of_node_scoped() to both fix the issue and save one line
of code.

Fixes: d0f8e97866bf ("i2c: muxes: add support for tsd,mule-i2c multiplexer")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/muxes/i2c-mux-mule.c