Commit 21098562 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mauro Carvalho Chehab

[media] c8sectpfe: fix error return code in c8sectpfe_probe()

Fix to return error code -ENODEV from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarPatrice Chotard <patrice.chotard@st.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 1f5ecaf9
...@@ -813,6 +813,7 @@ static int c8sectpfe_probe(struct platform_device *pdev) ...@@ -813,6 +813,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
i2c_bus = of_parse_phandle(child, "i2c-bus", 0); i2c_bus = of_parse_phandle(child, "i2c-bus", 0);
if (!i2c_bus) { if (!i2c_bus) {
dev_err(&pdev->dev, "No i2c-bus found\n"); dev_err(&pdev->dev, "No i2c-bus found\n");
ret = -ENODEV;
goto err_clk_disable; goto err_clk_disable;
} }
tsin->i2c_adapter = tsin->i2c_adapter =
...@@ -820,6 +821,7 @@ static int c8sectpfe_probe(struct platform_device *pdev) ...@@ -820,6 +821,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
if (!tsin->i2c_adapter) { if (!tsin->i2c_adapter) {
dev_err(&pdev->dev, "No i2c adapter found\n"); dev_err(&pdev->dev, "No i2c adapter found\n");
of_node_put(i2c_bus); of_node_put(i2c_bus);
ret = -ENODEV;
goto err_clk_disable; goto err_clk_disable;
} }
of_node_put(i2c_bus); of_node_put(i2c_bus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment