[media] c8sectpfe: fix error return code in c8sectpfe_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Sun, 30 Oct 2016 01:53:10 +0000 (23:53 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 21 Nov 2016 13:41:43 +0000 (11:41 -0200)
Fix to return error code -ENODEV from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c

index 22fd8b91809a0f5af3b066fc880c3e1a66479e18..7652ce2ec1dcfce9c0d73ec5c95a031d3db6e513 100644 (file)
@@ -813,6 +813,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
                i2c_bus = of_parse_phandle(child, "i2c-bus", 0);
                if (!i2c_bus) {
                        dev_err(&pdev->dev, "No i2c-bus found\n");
+                       ret = -ENODEV;
                        goto err_clk_disable;
                }
                tsin->i2c_adapter =
@@ -820,6 +821,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
                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);