From: Roel K. <roe...@gm...> - 2009-10-16 18:14:15
|
Only if the test is signed negative values can be spotted. Signed-off-by: Roel Kluin <roe...@gm...> --- Is this correct? please review. diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index 0d0c8c8..cc7dd93 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c @@ -286,7 +286,7 @@ static int _setcolreg(struct fb_info *info, u_int regno, u_int red, u_int green, if (r != 0) break; - if (regno < 0) { + if ((int)regno < 0) { r = -EINVAL; break; } |