diff mbox

[-next,media] v4l: ti-vpe: fix error return code in vpe_probe()

Message ID CAPgLHd_VJKy0Eqsyjb=_CKbCZTEvpq6Gh+ri3YSTHPEqLN=U0w@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yongjun Oct. 30, 2013, 3:10 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/media/platform/ti-vpe/vpe.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

archit taneja Nov. 5, 2013, 5:23 a.m. UTC | #1
On Wednesday 30 October 2013 08:40 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.

Reviewed-by: Archit Taneja <archit@ti.com>

Thanks,
Archit

>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>   drivers/media/platform/ti-vpe/vpe.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c
> index 4e58069..0dbfd52 100644
> --- a/drivers/media/platform/ti-vpe/vpe.c
> +++ b/drivers/media/platform/ti-vpe/vpe.c
> @@ -2007,8 +2007,10 @@ static int vpe_probe(struct platform_device *pdev)
>   	vpe_top_vpdma_reset(dev);
>
>   	dev->vpdma = vpdma_create(pdev);
> -	if (IS_ERR(dev->vpdma))
> +	if (IS_ERR(dev->vpdma)) {
> +		ret = PTR_ERR(dev->vpdma);
>   		goto runtime_put;
> +	}
>
>   	vfd = &dev->vfd;
>   	*vfd = vpe_videodev;
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c
index 4e58069..0dbfd52 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/platform/ti-vpe/vpe.c
@@ -2007,8 +2007,10 @@  static int vpe_probe(struct platform_device *pdev)
 	vpe_top_vpdma_reset(dev);
 
 	dev->vpdma = vpdma_create(pdev);
-	if (IS_ERR(dev->vpdma))
+	if (IS_ERR(dev->vpdma)) {
+		ret = PTR_ERR(dev->vpdma);
 		goto runtime_put;
+	}
 
 	vfd = &dev->vfd;
 	*vfd = vpe_videodev;