if (!(stinger = kmalloc(sizeof(struct stinger), GFP_KERNEL))) return -ENOMEM; 
stinger = kmalloc(sizeof(struct stinger), GFP_KERNEL); input_dev = input_allocate_device(); if (!stinger || !input_dev) goto fail; 
static int stinger_connect(struct serio *serio, struct serio_driver *drv){	struct stinger *stinger;	int i;	int err;	if (!(stinger = kmalloc(sizeof(struct stinger), GFP_KERNEL)))		return -ENOMEM;	memset(stinger, 0, sizeof(struct stinger));	stinger->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);	stinger->dev.keybit[LONG(BTN_A)] = BIT(BTN_A) | BIT(BTN_B) | BIT(BTN_C) | BIT(BTN_X) | \					   BIT(BTN_Y) | BIT(BTN_Z) | BIT(BTN_TL) | BIT(BTN_TR) | \					   BIT(BTN_START) | BIT(BTN_SELECT);	stinger->dev.absbit[0] = BIT(ABS_X) | BIT(ABS_Y);	sprintf(stinger->phys, "%s/serio0", serio->phys);	init_input_dev(&stinger->dev);	stinger->dev.name = stinger_name;	stinger->dev.phys = stinger->phys;	stinger->dev.id.bustype = BUS_RS232;	stinger->dev.id.vendor = SERIO_STINGER;	stinger->dev.id.product = 0x0001;	stinger->dev.id.version = 0x0100;	stinger->dev.dev = &serio->dev;	for (i = 0; i < 2; i++) {		stinger->dev.absmax[ABS_X+i] =  64;		stinger->dev.absmin[ABS_X+i] = -64;		stinger->dev.absflat[ABS_X+i] = 4;	}	stinger->dev.private = stinger;	serio_set_drvdata(serio, stinger);	err = serio_open(serio, drv);	if (err) {		serio_set_drvdata(serio, NULL);		kfree(stinger);		return err;	}	input_register_device(&stinger->dev);	printk(KERN_INFO "input: %s on %s\n",  stinger_name, serio->phys);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/17dd3f0f7aa729a042af5d3318ff9b3e7781b45b/stinger.c/buggy/drivers/input/joystick/stinger.c