From: Jani Nikula Date: Tue, 1 Jun 2010 14:33:54 +0000 (+0300) Subject: OMAP: DSS2: OMAPFB: Remove redundant color register range check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7f8b183059edc6c74654301431d520a91539e45f;p=linux-beck.git 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 --- 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)) <<