projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a9d462
)
video/omap: remove invalid check
author
Andrzej Hajda
<a.hajda@samsung.com>
Mon, 21 Sep 2015 13:34:00 +0000
(15:34 +0200)
committer
Tomi Valkeinen
<tomi.valkeinen@ti.com>
Thu, 24 Sep 2015 10:46:15 +0000
(13:46 +0300)
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>
drivers/video/fbdev/omap/omapfb_main.c
patch
|
blob
|
history
diff --git
a/drivers/video/fbdev/omap/omapfb_main.c
b/drivers/video/fbdev/omap/omapfb_main.c
index 1fb3ea3c98a1814fc7d4f2f4e77d53fbfc5f802b..393ae1bc07e8f76a4501e8b17c67cff26341445b 100644
(file)
--- 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,
if (r != 0)
break;
- if (regno < 0) {
- r = -EINVAL;
- break;
- }
-
if (regno < 16) {
u16 pal;
pal = ((red >> (16 - var->red.length)) <<