mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
OMAP: DSS2: OMAPFB: Remove redundant color register range check
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>
This commit is contained in:
parent
86f2d7dd72
commit
7f8b183059
1 changed files with 0 additions and 5 deletions
|
@ -1208,11 +1208,6 @@ static int _setcolreg(struct fb_info *fbi, 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 a new issue