if ((count > 4096) || ((count % 16) != 0) || (PAGE_SIZE < 4096)) 
if ((count > PAGE_SIZE) || ((count % 16) != 0)) 
static ssize_t store_cmap(struct class_device *class_device, const char *buf,			  size_t count){	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);	int rc, i, start, length, transp = 0;	if ((count > 4096) || ((count % 16) != 0) || (PAGE_SIZE < 4096))		return -EINVAL;	if (!fb_info->fbops->fb_setcolreg && !fb_info->fbops->fb_setcmap)		return -EINVAL;	sscanf(buf, "%02x", &start);	length = count / 16;	for (i = 0; i < length; i++)		if (buf[i * 16 + 2] != ' ')			transp = 1;	/* If we can batch, do it */	if (fb_info->fbops->fb_setcmap && length > 1) {		struct fb_cmap umap;		memset(&umap, 0, sizeof(umap));		if ((rc = fb_alloc_cmap(&umap, length, transp)))			return rc;		umap.start = start;		for (i = 0; i < length; i++) {			sscanf(&buf[i * 16 +  3], "%4hx", &umap.red[i]);			sscanf(&buf[i * 16 +  7], "%4hx", &umap.blue[i]);			sscanf(&buf[i * 16 + 11], "%4hx", &umap.green[i]);			if (transp)				umap.transp[i] = (buf[i * 16 +  2] != ' ');		}		rc = fb_info->fbops->fb_setcmap(&umap, fb_info);		fb_copy_cmap(&umap, &fb_info->cmap);		fb_dealloc_cmap(&umap);		return rc;	}	for (i = 0; i < length; i++) {		u16 red, blue, green, tsp;		sscanf(&buf[i * 16 +  3], "%4hx", &red);		sscanf(&buf[i * 16 +  7], "%4hx", &blue);		sscanf(&buf[i * 16 + 11], "%4hx", &green);		tsp = (buf[i * 16 +  2] != ' ');		if ((rc = fb_info->fbops->fb_setcolreg(start++,				      red, green, blue, tsp, fb_info)))			return rc;		fb_info->cmap.red[i] = red;		fb_info->cmap.blue[i] = blue;		fb_info->cmap.green[i] = green;		if (transp)			fb_info->cmap.transp[i] = tsp;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f0b9d796002d9d39575cf1beabfb625f68b507fa/fbsysfs.c/buggy/drivers/video/fbsysfs.c