Date:2010-04-07 11:41:14 (13 years 5 months ago)
Author:Dan Carpenter
Commit:981cbef2c30ee82d6011bb2ef50461f6a074de71
Message: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>
Files: drivers/media/video/sh_mobile_ceu_camera.c (1 diff)

Change Details

drivers/media/video/sh_mobile_ceu_camera.c
16331633    height = pix->height;
16341634
16351635    pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt);
1636    if (pix->bytesperline < 0)
1636    if ((int)pix->bytesperline < 0)
16371637        return pix->bytesperline;
16381638    pix->sizeimage = height * pix->bytesperline;
16391639

Archive Download the corresponding diff file



interactive