short_name = kmalloc(short_name_size + 1, GFP_KERNEL); new_efivar = kmalloc(sizeof(struct efivar_entry), GFP_KERNEL); 
short_name = kzalloc(short_name_size + 1, GFP_KERNEL); new_efivar = kzalloc(sizeof(struct efivar_entry), GFP_KERNEL); 
efivar_create_sysfs_entry(unsigned long variable_name_size,			efi_char16_t *variable_name,			efi_guid_t *vendor_guid){	int i, short_name_size = variable_name_size / sizeof(efi_char16_t) + 38;	char *short_name;	struct efivar_entry *new_efivar;	short_name = kmalloc(short_name_size + 1, GFP_KERNEL);	new_efivar = kmalloc(sizeof(struct efivar_entry), GFP_KERNEL);	if (!short_name || !new_efivar)  {		kfree(short_name);		kfree(new_efivar);		return 1;	}	memset(short_name, 0, short_name_size+1);	memset(new_efivar, 0, sizeof(struct efivar_entry));	memcpy(new_efivar->var.VariableName, variable_name,		variable_name_size);	memcpy(&(new_efivar->var.VendorGuid), vendor_guid, sizeof(efi_guid_t));	/* Convert Unicode to normal chars (assume top bits are 0),	   ala UTF-8 */	for (i=0; i < (int)(variable_name_size / sizeof(efi_char16_t)); i++) {		short_name[i] = variable_name[i] & 0xFF;	}	/* This is ugly, but necessary to separate one vendor's	   private variables from another's.         */	*(short_name + strlen(short_name)) = '-';	efi_guid_unparse(vendor_guid, short_name + strlen(short_name));	kobject_set_name(&new_efivar->kobj, "%s", short_name);	kobj_set_kset_s(new_efivar, vars_subsys);	kobject_register(&new_efivar->kobj);	kfree(short_name);	short_name = NULL;	spin_lock(&efivars_lock);	list_add(&new_efivar->list, &efivar_list);	spin_unlock(&efivars_lock);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/9c2153844d72ac92b6da0ee42f7f81fb0aa91f8a/efivars.c/clean/drivers/firmware/efivars.c