Commit 981cbef2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b7d41d6d
...@@ -1633,7 +1633,7 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd, ...@@ -1633,7 +1633,7 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd,
height = pix->height; height = pix->height;
pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt); pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt);
if (pix->bytesperline < 0) if ((int)pix->bytesperline < 0)
return pix->bytesperline; return pix->bytesperline;
pix->sizeimage = height * pix->bytesperline; pix->sizeimage = height * pix->bytesperline;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment