diff options
author | Dan Carpenter <error27@gmail.com> | 2010-04-07 05:41:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-06 18:20:52 -0400 |
commit | 981cbef2c30ee82d6011bb2ef50461f6a074de71 (patch) | |
tree | c3b5ca41ec470b406005d412865963975c54fd91 | |
parent | b7d41d6d580743b1fed1b9560d948c9ef58564bd (diff) |
V4L/DVB: video: testing unsigned for less than 0
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>
-rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 6e16b3979326..1ad980f8e770 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -1633,7 +1633,7 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd, | |||
1633 | height = pix->height; | 1633 | height = pix->height; |
1634 | 1634 | ||
1635 | pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt); | 1635 | pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt); |
1636 | if (pix->bytesperline < 0) | 1636 | if ((int)pix->bytesperline < 0) |
1637 | return pix->bytesperline; | 1637 | return pix->bytesperline; |
1638 | pix->sizeimage = height * pix->bytesperline; | 1638 | pix->sizeimage = height * pix->bytesperline; |
1639 | 1639 | ||