Re: [PATCH 15/16] rcar-vin: add missing error check to propagate error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Niklas,

Thank you for the patch.

On Tuesday 14 Mar 2017 19:59:56 Niklas Söderlund wrote:
> The return value of __rvin_try_format_source is not checked, add a check
> and propagate the error.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>

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

> ---
>  drivers/media/platform/rcar-vin/rcar-v4l2.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> b/drivers/media/platform/rcar-vin/rcar-v4l2.c index
> c40f5bc3e3d26472..956092ba6ef9bc6f 100644
> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> @@ -208,6 +208,7 @@ static int __rvin_try_format(struct rvin_dev *vin,
>  {
>  	const struct rvin_video_format *info;
>  	u32 rwidth, rheight, walign;
> +	int ret;
> 
>  	/* Requested */
>  	rwidth = pix->width;
> @@ -235,7 +236,9 @@ static int __rvin_try_format(struct rvin_dev *vin,
>  	pix->sizeimage = 0;
> 
>  	/* Limit to source capabilities */
> -	__rvin_try_format_source(vin, which, pix, source);
> +	ret = __rvin_try_format_source(vin, which, pix, source);
> +	if (ret)
> +		return ret;
> 
>  	switch (pix->field) {
>  	case V4L2_FIELD_TOP:

-- 
Regards,

Laurent Pinchart





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux