public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Longerbeam <slongerbeam@gmail.com>
To: "Gustavo A. R. Silva" <garsilva@embeddedor.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] staging: media: imx: fix inconsistent IS_ERR and PTR_ERR
Date: Tue, 17 Oct 2017 10:21:52 -0700	[thread overview]
Message-ID: <f843da31-9b94-7344-1111-a1aaf861ad4c@gmail.com> (raw)
In-Reply-To: <20171017171907.GA3957@embeddedor.com>



On 10/17/2017 10:19 AM, Gustavo A. R. Silva wrote:
> Fix inconsistent IS_ERR and PTR_ERR in csi_link_validate.
> The proper pointer to be passed as argument is sensor.
>
> This issue was detected with the help of Coccinelle.
>
> Reported-by: Julia Lawall<julia.lawall@lip6.fr>
> Signed-off-by: Gustavo A. R. Silva<garsilva@embeddedor.com>
> ---
> This code was tested by compilation only.
>
>   drivers/staging/media/imx/imx-media-csi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
> index 6d85611..2fa72c1 100644
> --- a/drivers/staging/media/imx/imx-media-csi.c
> +++ b/drivers/staging/media/imx/imx-media-csi.c
> @@ -989,7 +989,7 @@ static int csi_link_validate(struct v4l2_subdev *sd,
>   	sensor = __imx_media_find_sensor(priv->md, &priv->sd.entity);
>   	if (IS_ERR(sensor)) {
>   		v4l2_err(&priv->sd, "no sensor attached\n");
> -		return PTR_ERR(priv->sensor);
> +		return PTR_ERR(sensor);
>   	}
>   
>   	mutex_lock(&priv->lock);

Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>

      reply	other threads:[~2017-10-17 17:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 17:19 [PATCH] staging: media: imx: fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2017-10-17 17:21 ` 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=f843da31-9b94-7344-1111-a1aaf861ad4c@gmail.com \
    --to=slongerbeam@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=garsilva@embeddedor.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    /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