From 7f8b183059edc6c74654301431d520a91539e45f Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 1 Jun 2010 17:33:54 +0300 Subject: [PATCH] OMAP: DSS2: OMAPFB: Remove redundant color register range check Unsigned regno can never be less than zero. Found by Coverity. Signed-off-by: Jani Nikula Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/omapfb/omapfb-main.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 8303776647fc..4abb1d17231b 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -1208,11 +1208,6 @@ static int _setcolreg(struct fb_info *fbi, 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)) << -- 2.39.5