From: Andrzej Hajda Date: Mon, 21 Sep 2015 13:34:00 +0000 (+0200) Subject: video/omap: remove invalid check X-Git-Tag: firefly_0821_release~176^2~742^2~10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c50d5cd235210abffa1e88affbead1adbd5f294a;p=firefly-linux-kernel-4.4.55.git video/omap: remove invalid check regno is unsigned so it cannot be negative. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index 1fb3ea3c98a1..393ae1bc07e8 100644 --- a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c @@ -276,11 +276,6 @@ static int _setcolreg(struct fb_info *info, u_int regno, u_int red, u_int green, if (r != 0) break; - if (regno < 0) { - r = -EINVAL; - break; - } - if (regno < 16) { u16 pal; pal = ((red >> (16 - var->red.length)) <<