red = cmap->red; green = cmap->green; blue = cmap->blue; transp = cmap->transp; start = cmap->start;  if (start < 0 || (!info->fbops->fb_setcolreg && !info->fbops->fb_setcmap)) 
if (cmap->start < 0 || (!info->fbops->fb_setcolreg && !info->fbops->fb_setcmap)) 
int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info){	int i, start;	u16 __user *red, *green, *blue, *transp;	u_int hred, hgreen, hblue, htransp = 0xffff;	red = cmap->red;	green = cmap->green;	blue = cmap->blue;	transp = cmap->transp;	start = cmap->start;	if (start < 0 || (!info->fbops->fb_setcolreg &&			  !info->fbops->fb_setcmap))		return -EINVAL;	/* If we can batch, do it */	if (info->fbops->fb_setcmap && cmap->len > 1) {		struct fb_cmap umap;		int size = cmap->len * sizeof(u16);		int rc;		memset(&umap, 0, sizeof(struct fb_cmap));		rc = fb_alloc_cmap(&umap, cmap->len, transp != NULL);		if (rc)			return rc;		if (copy_from_user(umap.red, red, size) ||		    copy_from_user(umap.green, green, size) ||		    copy_from_user(umap.blue, blue, size) ||		    (transp && copy_from_user(umap.transp, transp, size))) {			rc = -EFAULT;		}		umap.start = start;		if (rc == 0)			rc = info->fbops->fb_setcmap(&umap, info);		fb_dealloc_cmap(&umap);		return rc;	}	for (i = 0; i < cmap->len; i++, red++, blue++, green++) {		if (get_user(hred, red) ||		    get_user(hgreen, green) ||		    get_user(hblue, blue) ||		    (transp && get_user(htransp, transp)))			return -EFAULT;		if (info->fbops->fb_setcolreg(start++,					      hred, hgreen, hblue, htransp,					      info))			return 0;		if (transp)			transp++;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/03e259a9cdbd0583e71468293aaa1ccadbdaeff1/fbcmap.c/clean/drivers/video/fbcmap.c