diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-10-29 23:53:10 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-21 11:41:43 -0200 |
commit | 21098562a41ce24af1e105dc96179260ebcc980c (patch) | |
tree | 8c1b2f53f0ae2e655da14148c6370af927dd5fd9 /drivers/media/platform/sti | |
parent | 1f5ecaf985c46889278f51fcb7bc143f60f4eb14 (diff) | |
download | linux-21098562a41ce24af1e105dc96179260ebcc980c.tar.gz |
[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: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/sti')
-rw-r--r-- | drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c index 22fd8b91809a..7652ce2ec1dc 100644 --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c @@ -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); |