]> git.karo-electronics.de Git - linux-beck.git/commitdiff
OMAP: DSS2: OMAPFB: Remove redundant color register range check
authorJani Nikula <ext-jani.1.nikula@nokia.com>
Tue, 1 Jun 2010 14:33:54 +0000 (17:33 +0300)
committerTomi Valkeinen <tomi.valkeinen@nokia.com>
Thu, 5 Aug 2010 13:52:09 +0000 (16:52 +0300)
Unsigned regno can never be less than zero. Found by Coverity.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
drivers/video/omap2/omapfb/omapfb-main.c

index 8303776647fcce9a26d7719f31a854fec6458754..4abb1d17231b2c0c393baa0d2ac8343c127fd18b 100644 (file)
@@ -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)) <<