linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2 1/6] rcar-vin: Fix incorrect return statement in rvin_try_format()
Date: Thu, 8 Aug 2019 11:25:33 +0300	[thread overview]
Message-ID: <20190808082533.GC6055@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20190808011850.21219-2-niklas.soderlund+renesas@ragnatech.se>

Hi Niklas,

Thank you for the patch.

On Thu, Aug 08, 2019 at 03:18:45AM +0200, Niklas Söderlund wrote:
> While refactoring code the return statement became corrupted, fix it by
> returning the correct return code.
> 
> Reported-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> Fixes: 897e371389e77514 ("media: rcar-vin: simplify how formats are set and reset"
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>  drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> index cfed0a2604133849..402b40fcf7184fde 100644
> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> @@ -239,7 +239,7 @@ static int rvin_try_format(struct rvin_dev *vin, u32 which,
>  done:
>  	v4l2_subdev_free_pad_config(pad_cfg);
>  
> -	return 0;
> +	return ret;

If the v4l2_subdev_call() call above returns -ENOIOCTLCMD, which you
don't consider as an error, you will end up returning that error value
here. You should set ret to 0 before the done: label. With this fixed,

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

>  }
>  
>  static int rvin_querycap(struct file *file, void *priv,

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2019-08-08  8:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08  1:18 [PATCH v2 0/6] rcar-vin: Add support for V4L2_FIELD_ALTERNATE Niklas Söderlund
2019-08-08  1:18 ` [PATCH v2 1/6] rcar-vin: Fix incorrect return statement in rvin_try_format() Niklas Söderlund
2019-08-08  8:25   ` Laurent Pinchart [this message]
2019-08-08  1:18 ` [PATCH v2 2/6] rcar-vin: Make use of V4L2_FIELD_IS_INTERLACED() macro Niklas Söderlund
2019-08-08  8:27   ` Laurent Pinchart
2019-08-08  1:18 ` [PATCH v2 3/6] rcar-vin: Rename rectangle holding the video source information Niklas Söderlund
2019-08-08  8:30   ` Laurent Pinchart
2019-09-04 12:52     ` Niklas Söderlund
2019-08-08  1:18 ` [PATCH v2 4/6] rcar-vin: Do not reset the crop and compose rectangles in s_fmt Niklas Söderlund
2019-08-08  8:37   ` Laurent Pinchart
2019-08-08 13:35     ` Niklas Söderlund
2019-08-28 10:25       ` Hans Verkuil
2019-08-08  1:18 ` [PATCH v2 5/6] rcar-vin: Add support for V4L2_FIELD_ALTERNATE Niklas Söderlund
2019-08-08  1:18 ` [PATCH v2 6/6] rcar-vin: Clean up how format is set on subdevice Niklas Söderlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190808082533.GC6055@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).