Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bb40585 authored by Chen Gang's avatar Chen Gang Committed by Tomi Valkeinen
Browse files

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: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 51617d1b
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -285,13 +285,8 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
		rc = -ENODEV;
		rc = -ENODEV;
		goto out;
		goto out;
	}
	}
	if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&

				!info->fbops->fb_setcmap)) {
		rc = -EINVAL;
		goto out1;
	}
	rc = fb_set_cmap(&umap, info);
	rc = fb_set_cmap(&umap, info);
out1:
	unlock_fb_info(info);
	unlock_fb_info(info);
out:
out:
	fb_dealloc_cmap(&umap);
	fb_dealloc_cmap(&umap);