diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2015-09-21 09:34:00 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-09-24 06:46:15 -0400 |
commit | c50d5cd235210abffa1e88affbead1adbd5f294a (patch) | |
tree | 6447c26b4de4cc3095d94c9ddaa3bd00ce6decd2 | |
parent | 8a9d4626db312fe0a682c35ef43fe8d9160c2ecd (diff) |
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 <a.hajda@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/fbdev/omap/omapfb_main.c | 5 |
1 files changed, 0 insertions, 5 deletions
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, | |||
276 | if (r != 0) | 276 | if (r != 0) |
277 | break; | 277 | break; |
278 | 278 | ||
279 | if (regno < 0) { | ||
280 | r = -EINVAL; | ||
281 | break; | ||
282 | } | ||
283 | |||
284 | if (regno < 16) { | 279 | if (regno < 16) { |
285 | u16 pal; | 280 | u16 pal; |
286 | pal = ((red >> (16 - var->red.length)) << | 281 | pal = ((red >> (16 - var->red.length)) << |