* Initilize the slot info structure with some known 
* Initialize the slot info structure with some known 
static int __init init_slots(void){	struct slot *slot;	struct hotplug_slot *hotplug_slot;	struct hotplug_slot_info *info;	char *name;	int retval = -ENOMEM;	int i;	/*	 * Create a structure for each slot, and register that slot	 * with the pci_hotplug subsystem.	 */	for (i = 0; i < num_slots; ++i) {		slot = kmalloc(sizeof(struct slot), GFP_KERNEL);		if (!slot)			goto error;		memset(slot, 0, sizeof(struct slot));		hotplug_slot = kmalloc(sizeof(struct hotplug_slot),					GFP_KERNEL);		if (!hotplug_slot)			goto error_slot;		memset(hotplug_slot, 0, sizeof (struct hotplug_slot));		slot->hotplug_slot = hotplug_slot;		info = kmalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL);		if (!info)			goto error_hpslot;		memset(info, 0, sizeof (struct hotplug_slot_info));		hotplug_slot->info = info;		name = kmalloc(SLOT_NAME_SIZE, GFP_KERNEL);		if (!name)			goto error_info;		hotplug_slot->name = name;		slot->number = i;		hotplug_slot->private = slot;		hotplug_slot->release = &release_slot;		make_slot_name(slot);		hotplug_slot->ops = &skel_hotplug_slot_ops;				/*		 * Initilize the slot info structure with some known		 * good values.		 */		info->power_status = get_power_status(slot);		info->attention_status = get_attention_status(slot);		info->latch_status = get_latch_status(slot);		info->adapter_status = get_adapter_status(slot);				dbg("registering slot %d\n", i);		retval = pci_hp_register(slot->hotplug_slot);		if (retval) {			err("pci_hp_register failed with error %d\n", retval);			goto error_name;		}		/* add slot to our internal list */		list_add(&slot->slot_list, &slot_list);	}	return 0;error_name:	kfree(name);error_info:	kfree(info);error_hpslot:	kfree(hotplug_slot);error_slot:	kfree(slot);error:	return retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/eaae4b3a84a3781543a32bcaf0a33306ae915574/pcihp_skeleton.c/buggy/drivers/pci/hotplug/pcihp_skeleton.c