diff mbox series

[v3,02/38] media: ti-vpe: cal: fix error handling in cal_camerarx_create

Message ID 20210524110909.672432-3-tomi.valkeinen@ideasonboard.com
State Superseded
Headers show
Series media: ti-vpe: cal: multistream & embedded data support | expand

Commit Message

Tomi Valkeinen May 24, 2021, 11:08 a.m. UTC
cal_camerarx_create() doesn't handle error returned from
cal_camerarx_sd_init_cfg(). Fix this.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
 drivers/media/platform/ti-vpe/cal-camerarx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Laurent Pinchart June 4, 2021, 12:12 p.m. UTC | #1
Hi Tomi,

Thank you for the patch.

On Mon, May 24, 2021 at 02:08:33PM +0300, Tomi Valkeinen wrote:
> cal_camerarx_create() doesn't handle error returned from

> cal_camerarx_sd_init_cfg(). Fix this.

> 

> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>


Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>


> ---

>  drivers/media/platform/ti-vpe/cal-camerarx.c | 4 +++-

>  1 file changed, 3 insertions(+), 1 deletion(-)

> 

> diff --git a/drivers/media/platform/ti-vpe/cal-camerarx.c b/drivers/media/platform/ti-vpe/cal-camerarx.c

> index 124a4e2bdefe..e2e384a887ac 100644

> --- a/drivers/media/platform/ti-vpe/cal-camerarx.c

> +++ b/drivers/media/platform/ti-vpe/cal-camerarx.c

> @@ -845,7 +845,9 @@ struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal,

>  	if (ret)

>  		goto error;

>  

> -	cal_camerarx_sd_init_cfg(sd, NULL);

> +	ret = cal_camerarx_sd_init_cfg(sd, NULL);

> +	if (ret)

> +		goto error;

>  

>  	ret = v4l2_device_register_subdev(&cal->v4l2_dev, sd);

>  	if (ret)


-- 
Regards,

Laurent Pinchart
diff mbox series

Patch

diff --git a/drivers/media/platform/ti-vpe/cal-camerarx.c b/drivers/media/platform/ti-vpe/cal-camerarx.c
index 124a4e2bdefe..e2e384a887ac 100644
--- a/drivers/media/platform/ti-vpe/cal-camerarx.c
+++ b/drivers/media/platform/ti-vpe/cal-camerarx.c
@@ -845,7 +845,9 @@  struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal,
 	if (ret)
 		goto error;
 
-	cal_camerarx_sd_init_cfg(sd, NULL);
+	ret = cal_camerarx_sd_init_cfg(sd, NULL);
+	if (ret)
+		goto error;
 
 	ret = v4l2_device_register_subdev(&cal->v4l2_dev, sd);
 	if (ret)