]> www.infradead.org Git - users/jedix/linux-maple.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)
committerHans Verkuil <hverkuil@xs4all.nl>
Thu, 6 Mar 2025 16:28:28 +0000 (17:28 +0100)
commitb773530a34df0687020520015057075f8b7b4ac4
tree658852efdfd2dd2248f4f3d048fb3d530db4d41c
parentb50231ff015ee223732a4783eda954609369076c
media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()

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>
drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c