From: Chen Gang Date: Tue, 20 Aug 2013 02:33:56 +0000 (+0800) Subject: drivers: video: fbcmap: remove the redundency and incorrect checkings X-Git-Tag: upstream/snapshot3+hdmi~4427^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9bb40585c9d934db3585e1f422e2ffb1dd5e9631;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git drivers: video: fbcmap: remove the redundency and incorrect checkings 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 Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c index 5c3960d..f89245b 100644 --- a/drivers/video/fbcmap.c +++ b/drivers/video/fbcmap.c @@ -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);