]> 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:40:08 +0000 (14:40 +0200)
commit2996d38f2dee64e0141878617a03198b198b721e
tree266a31b8b6b0d94938e751db7c825b60c0370963
parentb649481a1c14f64c3bd52cd2cfe5a837ab6d7fc7
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