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>
This commit is contained in:
parent
8a9d4626db
commit
c50d5cd235
|
@ -276,11 +276,6 @@ static int _setcolreg(struct fb_info *info, u_int regno, u_int red, u_int green,
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (regno < 0) {
|
|
||||||
r = -EINVAL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (regno < 16) {
|
if (regno < 16) {
|
||||||
u16 pal;
|
u16 pal;
|
||||||
pal = ((red >> (16 - var->red.length)) <<
|
pal = ((red >> (16 - var->red.length)) <<
|
||||||
|
|
Loading…
Reference in New Issue