public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: Levente Kurusa <levex@linux.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mauro Carvalho Chehab <m.chehab@samsung.com>,
	LKML <linux-kernel@vger.kernel.org>,
	OSUOSL Drivers <devel@driverdev.osuosl.org>,
	Linux Media <linux-media@vger.kernel.org>,
	Lisa Nguyen <lisa@xenapiadmin.com>,
	Archana kumari <archanakumari959@gmail.com>,
	David Binderman <dcb314@hotmail.com>
Subject: Re: [PATCH] staging: davinci_vpfe: fix error check
Date: Sat, 15 Feb 2014 09:16:19 -0800	[thread overview]
Message-ID: <20140215171619.GA22985@leaf> (raw)
In-Reply-To: <1392459431-28203-1-git-send-email-levex@linux.com>

On Sat, Feb 15, 2014 at 11:17:11AM +0100, Levente Kurusa wrote:
> The check would check the pointer, which is never less than 0.
> According to the error message, the correct check would be
> to check the return value of ipipe_mode. Check that instead.
> 
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Levente Kurusa <levex@linux.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
> index 2d36b60..b2daf5e 100644
> --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
> +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
> @@ -267,7 +267,7 @@ int config_ipipe_hw(struct vpfe_ipipe_device *ipipe)
>  	}
>  
>  	ipipe_mode = get_ipipe_mode(ipipe);
> -	if (ipipe < 0) {
> +	if (ipipe_mode < 0) {
>  		pr_err("Failed to get ipipe mode");
>  		return -EINVAL;
>  	}
> -- 
> 1.8.3.1
> 

  reply	other threads:[~2014-02-15 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-15 10:17 [PATCH] staging: davinci_vpfe: fix error check Levente Kurusa
2014-02-15 17:16 ` Josh Triplett [this message]
2014-02-18 14:32   ` Laurent Pinchart

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=20140215171619.GA22985@leaf \
    --to=josh@joshtriplett.org \
    --cc=archanakumari959@gmail.com \
    --cc=dcb314@hotmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=levex@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=lisa@xenapiadmin.com \
    --cc=m.chehab@samsung.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