* [PATCH -next] [media] c8sectpfe: fix error return code in c8sectpfe_probe()
@ 2016-10-30 1:53 Wei Yongjun
2016-11-02 13:07 ` Patrice Chotard
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-10-30 1:53 UTC (permalink / raw)
To: linux-arm-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
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>
---
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 42b123f..69d9a16 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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH -next] [media] c8sectpfe: fix error return code in c8sectpfe_probe()
2016-10-30 1:53 [PATCH -next] [media] c8sectpfe: fix error return code in c8sectpfe_probe() Wei Yongjun
@ 2016-11-02 13:07 ` Patrice Chotard
0 siblings, 0 replies; 2+ messages in thread
From: Patrice Chotard @ 2016-11-02 13:07 UTC (permalink / raw)
To: linux-arm-kernel
On 10/30/2016 02:53 AM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> 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>
> ---
> drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
> index 42b123f..69d9a16 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);
>
Hi Wei
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-02 13:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-30 1:53 [PATCH -next] [media] c8sectpfe: fix error return code in c8sectpfe_probe() Wei Yongjun
2016-11-02 13:07 ` Patrice Chotard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).