]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers: video: fbcmap: remove the redundency and incorrect checkings
authorChen Gang <gang.chen@asianux.com>
Tue, 20 Aug 2013 02:33:56 +0000 (10:33 +0800)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 30 Aug 2013 08:41:24 +0000 (11:41 +0300)
fb_set_cmap() already checks the parameters, so need remove the
redundancy checking.

This redundancy checking is also incorrect, the related warning:

  drivers/video/fbcmap.c:288:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbcmap.c

index 5c3960da755aa52eefe1069442e9a43341e43e8c..f89245b8ba8e9a28483c4ff5edb03b80a1a9b2e3 100644 (file)
@@ -285,13 +285,8 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
                rc = -ENODEV;
                goto out;
        }
-       if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
-                               !info->fbops->fb_setcmap)) {
-               rc = -EINVAL;
-               goto out1;
-       }
+
        rc = fb_set_cmap(&umap, info);
-out1:
        unlock_fb_info(info);
 out:
        fb_dealloc_cmap(&umap);