OMAP: DSS2: OMAPFB: Remove redundant rotate range check
authorJani Nikula <ext-jani.1.nikula@nokia.com>
Tue, 1 Jun 2010 14:25:10 +0000 (17:25 +0300)
committerTomi Valkeinen <tomi.valkeinen@nokia.com>
Thu, 5 Aug 2010 13:52:08 +0000 (16:52 +0300)
Unsigned rotate 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 db307e3c1dd5bbd7a7e401ed61762af41e660930..8303776647fcce9a26d7719f31a854fec6458754 100644 (file)
@@ -683,7 +683,7 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var)
                }
        }
 
-       if (var->rotate < 0 || var->rotate > 3)
+       if (var->rotate > 3)
                return -EINVAL;
 
        if (check_fb_res_bounds(var))