From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Benoit Parrot <bparrot@ti.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-media <linux-media@vger.kernel.org>,
devicetree@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [Patch v4 4/8] media: i2c: ov2659: fix s_stream return value
Date: Fri, 27 Sep 2019 21:33:28 +0100 [thread overview]
Message-ID: <CA+V-a8t3h6+2a8QWKWNwROJRz546rGbUyXs5ez9wtH6AQ-euPA@mail.gmail.com> (raw)
In-Reply-To: <20190927184722.31989-5-bparrot@ti.com>
Hi Benoit,
thank you for the patch.
On Fri, Sep 27, 2019 at 7:46 PM Benoit Parrot <bparrot@ti.com> wrote:
>
> In ov2659_s_stream() return value for invoked function should be checked
> and propagated.
>
> Signed-off-by: Benoit Parrot <bparrot@ti.com>
> ---
> drivers/media/i2c/ov2659.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c
> index f77320e8a60d..cd4625432264 100644
> --- a/drivers/media/i2c/ov2659.c
> +++ b/drivers/media/i2c/ov2659.c
> @@ -1187,10 +1187,13 @@ static int ov2659_s_stream(struct v4l2_subdev *sd, int on)
> goto unlock;
> }
>
> - ov2659_set_pixel_clock(ov2659);
> - ov2659_set_frame_size(ov2659);
> - ov2659_set_format(ov2659);
> - ov2659_set_streaming(ov2659, 1);
> + ret = ov2659_set_pixel_clock(ov2659);
> + if (!ret)
> + ret = ov2659_set_frame_size(ov2659);
> + if (!ret)
> + ret = ov2659_set_format(ov2659);
> + if (!ret)
> + ov2659_set_streaming(ov2659, 1);
> ov2659->streaming = on;
>
the "ov2659->streaming = on;" should only be set if above calls
succeed, otherwise we might hit -EBUSY during set_fmt.
Cheers,
--Prabhakar Lad
> unlock:
> --
> 2.17.1
>
next prev parent reply other threads:[~2019-09-27 20:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-27 18:47 [Patch v4 0/8] media: i2c: ov2659: maintenance series Benoit Parrot
2019-09-27 18:47 ` [Patch v4 1/8] media: i2c: ov2659: Fix for image wrap-around in lower resolution Benoit Parrot
2019-09-27 20:34 ` Lad, Prabhakar
2019-09-27 18:47 ` [Patch v4 2/8] media: i2c: ov2659: Fix sensor detection to actually fail when device is not present Benoit Parrot
2019-09-27 20:35 ` Lad, Prabhakar
2019-09-27 18:47 ` [Patch v4 3/8] media: i2c: ov2659: Cleanup include file list Benoit Parrot
2019-09-27 20:35 ` Lad, Prabhakar
2019-09-27 18:47 ` [Patch v4 4/8] media: i2c: ov2659: fix s_stream return value Benoit Parrot
2019-09-27 20:33 ` Lad, Prabhakar [this message]
2019-09-30 12:08 ` Benoit Parrot
2019-09-27 18:47 ` [Patch v4 5/8] media: dt-bindings: ov2659: add powerdown/reset-gpios optional property Benoit Parrot
2019-09-27 20:37 ` Lad, Prabhakar
2019-09-27 18:47 ` [Patch v4 6/8] media: i2c: ov2659: Add powerdown/reset gpio handling Benoit Parrot
2019-09-27 21:09 ` Lad, Prabhakar
2019-09-30 12:11 ` Benoit Parrot
2019-09-30 7:28 ` Sakari Ailus
2019-09-30 12:29 ` Benoit Parrot
2019-09-30 12:38 ` Sakari Ailus
2019-09-27 18:47 ` [Patch v4 7/8] media: i2c: ov2659: Fix missing 720p register config Benoit Parrot
2019-09-27 20:36 ` Lad, Prabhakar
2019-09-27 18:47 ` [Patch v4 8/8] media: i2c: ov2659: Switch to SPDX Licensing Benoit Parrot
2019-09-27 21:11 ` Lad, Prabhakar
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=CA+V-a8t3h6+2a8QWKWNwROJRz546rGbUyXs5ez9wtH6AQ-euPA@mail.gmail.com \
--to=prabhakar.csengg@gmail.com \
--cc=bparrot@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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).