Skip to content

Commit

Permalink
V4L/DVB: video: testing unsigned for less than 0
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
error27 authored and Mauro Carvalho Chehab committed May 6, 2010
1 parent b7d41d6 commit 981cbef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/sh_mobile_ceu_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 981cbef

Please sign in to comment.