if (vga16fb_check_var(&vga16fb.var, &vga16fb)) { printk(KERN_ERR "vga16fb: unable to validate variable\n"); ret = -EINVAL; goto err_check_var; }  vga16fb_update_fix(&vga16fb);  if (register_framebuffer(&vga16fb) < 0) { printk(KERN_ERR "vga16fb: unable to register framebuffer\n"); ret = -EINVAL; goto err_check_var; }  printk(KERN_INFO "fb%d: %s frame buffer device\n", vga16fb.node, vga16fb.fix.id);  return 0;  err_check_var: fb_dealloc_cmap(&vga16fb.cmap); err_alloc_cmap: iounmap(vga16fb.screen_base); err_ioremap: 
static int __init vga16fb_init(void){	int i;	int ret;#ifndef MODULE	char *option = NULL;	if (fb_get_options("vga16fb", &option))		return -ENODEV;	vga16fb_setup(option);#endif	printk(KERN_DEBUG "vga16fb: initializing\n");	/* XXX share VGA_FB_PHYS and I/O region with vgacon and others */	vga16fb.screen_base = (void __iomem *)VGA_MAP_MEM(VGA_FB_PHYS);	if (!vga16fb.screen_base) {		printk(KERN_ERR "vga16fb: unable to map device\n");		ret = -ENOMEM;		goto err_ioremap;	}	printk(KERN_INFO "vga16fb: mapped to 0x%p\n", vga16fb.screen_base);	vga16_par.isVGA = ORIG_VIDEO_ISVGA;	vga16_par.palette_blanked = 0;	vga16_par.vesa_blanked = 0;	i = vga16_par.isVGA? 6 : 2;		vga16fb_defined.red.length   = i;	vga16fb_defined.green.length = i;	vga16fb_defined.blue.length  = i;		/* name should not depend on EGA/VGA */	vga16fb.fbops = &vga16fb_ops;	vga16fb.var = vga16fb_defined;	vga16fb.fix = vga16fb_fix;	vga16fb.par = &vga16_par;	vga16fb.flags = FBINFO_FLAG_DEFAULT |		FBINFO_HWACCEL_YPAN;	i = (vga16fb_defined.bits_per_pixel == 8) ? 256 : 16;	ret = fb_alloc_cmap(&vga16fb.cmap, i, 0);	if (ret) {		printk(KERN_ERR "vga16fb: unable to allocate colormap\n");		ret = -ENOMEM;		goto err_alloc_cmap;	}	if (vga16fb_check_var(&vga16fb.var, &vga16fb)) {		printk(KERN_ERR "vga16fb: unable to validate variable\n");		ret = -EINVAL;		goto err_check_var;	}	vga16fb_update_fix(&vga16fb);	if (register_framebuffer(&vga16fb) < 0) {		printk(KERN_ERR "vga16fb: unable to register framebuffer\n");		ret = -EINVAL;		goto err_check_var;	}	printk(KERN_INFO "fb%d: %s frame buffer device\n",	       vga16fb.node, vga16fb.fix.id);	return 0; err_check_var:	fb_dealloc_cmap(&vga16fb.cmap); err_alloc_cmap:	iounmap(vga16fb.screen_base); err_ioremap:	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/120ddb41f18c2d41702af561f4acfbcbd8d6fb46/vga16fb.c/buggy/drivers/video/vga16fb.c