Unsigned regno cannot be less than 0.

Signed-off-by: Roel Kluin <roel.kl...@gmail.com>
---
Is this correct? please review.

diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 060d72f..787271f 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -276,7 +276,7 @@ static int _setcolreg(struct fb_info *info, u_int regno, 
u_int red, u_int green,
                if (r != 0)
                        break;
 
-               if (regno < 0) {
+               if (regno >= info->cmap.len) {
                        r = -EINVAL;
                        break;
                }
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to