]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 4 Oct 2024 13:50:15 +0000 (15:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:42:02 +0000 (14:42 +0200)
commitd5f8c8ec1e783aa713118cc905660eb82b3f8aa6
tree4c93c8b34a849d1fb876f82af5569a700c854658
parent74eea50b7afa1f9c1634c262baa3c7342b6e806a
media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()

[ Upstream commit b773530a34df0687020520015057075f8b7b4ac4 ]

An of_node_put(i2c_bus) call was immediately used after a pointer check
for an of_find_i2c_adapter_by_node() call in this function implementation.
Thus call such a function only once instead directly before the check.

This issue was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c