Re: [git:v4l-dvb/master] V4L/DVB: video: comparing unsigned with negative 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 8 Apr 2010, Mauro Carvalho Chehab wrote:

> This is an automatic generated email to let you know that the following patch were queued at the 
> http://git.linuxtv.org/v4l-dvb.git tree:

Yes, I was going to push this via my tree, but that's even going to be 
faster this way, I forgot, that I can now just ack patches and ask you to 
apply them directly, thanks for picking it up, Mauro! I'm not sure, what's 
meant by "queued" here, but we also want this for "fixes," right? And if 
it's not too late, here goes

Acked-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>

Thanks
Guennadi

> Subject: V4L/DVB: video: comparing unsigned with negative 0
> Author:  Dan Carpenter <error27@xxxxxxxxx>
> Date:    Wed Apr 7 06:41:14 2010 -0300
> 
> soc_mbus_bytes_per_line() returns -EINVAL on error but we store it in an
> unsigned int so the test for less than zero doesn't work.  I think it
> always returns "small" positive values so we can just cast it to int
> here.
> 
> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
> Cc: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> 
>  drivers/media/video/sh_mobile_ceu_camera.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> ---
> 
> http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=ec1e4eee7561bfdd99ef9e212fdb24aab2b224e4
> 
> diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c
> index cb34e74..a504fa6 100644
> --- a/drivers/media/video/sh_mobile_ceu_camera.c
> +++ b/drivers/media/video/sh_mobile_ceu_camera.c
> @@ -1632,7 +1632,7 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd,
>  	height = pix->height;
>  
>  	pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt);
> -	if (pix->bytesperline < 0)
> +	if ((int)pix->bytesperline < 0)
>  		return pix->bytesperline;
>  	pix->sizeimage = height * pix->bytesperline;
>  
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux