]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: fsi: Fix a potential leak in fsi_i2c_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 1 Mar 2026 16:21:01 +0000 (17:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2026 10:08:56 +0000 (11:08 +0100)
commit3facec19f80cc30d77de3a34f531c74feeab3667
tree8f3444c129e774bc75c1d863a1628567098e8e02
parent13ccf9b106bba121728f1625c4375a1bd8f5c5a3
i2c: fsi: Fix a potential leak in fsi_i2c_probe()

commit be627abcc0d5dbd5882873bd85fbc18aa3d189ed upstream.

In the commit in Fixes:, when the code has been updated to use an explicit
for loop, instead of for_each_available_child_of_node(), the assumption
that a reference to a device_node structure would be released at each
iteration has been broken.

Now, an explicit of_node_put() is needed to release the reference.

Fixes: 095561f476ab ("i2c: fsi: Create busses for all ports")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: <stable@vger.kernel.org> # v5.3+
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/fd805c39f8de51edf303856103d782138a1633c8.1772382022.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-fsi.c