]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
V4L/DVB: video: testing unsigned for less than 0
authorDan Carpenter <error27@gmail.com>
Wed, 7 Apr 2010 09:41:14 +0000 (06:41 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 6 May 2010 22:20:52 +0000 (19:20 -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@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/sh_mobile_ceu_camera.c

index 6e16b3979326fd2e39b6bfc910df9fa66ef23e1e..1ad980f8e770adc44c5f1659e4d29c6da180a6d4 100644 (file)
@@ -1633,7 +1633,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;