mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
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>
This commit is contained in:
parent
b468b0d85f
commit
33cc26204e
1 changed files with 1 additions and 2 deletions
|
|
@ -813,13 +813,12 @@ static int c8sectpfe_probe(struct platform_device *pdev)
|
|||
}
|
||||
tsin->i2c_adapter =
|
||||
of_find_i2c_adapter_by_node(i2c_bus);
|
||||
of_node_put(i2c_bus);
|
||||
if (!tsin->i2c_adapter) {
|
||||
dev_err(&pdev->dev, "No i2c adapter found\n");
|
||||
of_node_put(i2c_bus);
|
||||
ret = -ENODEV;
|
||||
goto err_clk_disable;
|
||||
}
|
||||
of_node_put(i2c_bus);
|
||||
|
||||
tsin->rst_gpio = of_get_named_gpio(child, "reset-gpios", 0);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue