linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Longerbeam <slongerbeam@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] media: staging/imx: Missing assignment in imx_media_capture_device_register()
Date: Tue, 11 Feb 2020 10:10:57 -0800	[thread overview]
Message-ID: <8cafab51-93d9-9596-bf4d-d8990df7ccda@gmail.com> (raw)
In-Reply-To: <20200211073522.jobdu256d22c3y32@kili.mountain>

Thanks for catching. Tested on a imx6 sabreauto and it's fine.

On 2/10/20 11:35 PM, Dan Carpenter wrote:
> There was supposed to be a "ret = " assignment here, otherwise the
> error handling on the next line won't work.
>
> Fixes: 64b5a49df486 ("[media] media: imx: Add Capture Device Interface")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Steve Longerbeam <slongerbeam@gmail.com>

> ---
> Not tested.  Sometimes in these situations the function could be
> returning something bogus but no one knew because the assignment wasn't
> there.  So it's best to test these.
>
>   drivers/staging/media/imx/imx-media-capture.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
> index 7712e7be8625..df0bf680721b 100644
> --- a/drivers/staging/media/imx/imx-media-capture.c
> +++ b/drivers/staging/media/imx/imx-media-capture.c
> @@ -778,7 +778,7 @@ int imx_media_capture_device_register(struct imx_media_video_dev *vdev)
>   	/* setup default format */
>   	fmt_src.pad = priv->src_sd_pad;
>   	fmt_src.which = V4L2_SUBDEV_FORMAT_ACTIVE;
> -	v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt_src);
> +	ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt_src);
>   	if (ret) {
>   		v4l2_err(sd, "failed to get src_sd format\n");
>   		goto unreg;


      reply	other threads:[~2020-02-11 18:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11  7:35 [PATCH] media: staging/imx: Missing assignment in imx_media_capture_device_register() Dan Carpenter
2020-02-11 18:10 ` Steve Longerbeam [this message]

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=8cafab51-93d9-9596-bf4d-d8990df7ccda@gmail.com \
    --to=slongerbeam@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hans.verkuil@cisco.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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).