Skip to contentSkip to conversation

efi: remove "kfree(NULL)"

PATCH Applied Dan Carpenter 2 participants 2 messages Apr 30, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi: remove "kfree(NULL)"

No need to free a NULL pointer.

drivers/firmware/efi/efivars.c +1 -3
index 66928a3..7067b56 100644
@@ -420,10 +420,8 @@ efivar_create_sysfs_entry(struct efivar_entry *new_var)
 
 	short_name = kzalloc(short_name_size, GFP_KERNEL);
 
-	if (!short_name) {
-		kfree(short_name);
+	if (!short_name)
 		return 1;
-	}
 
 	/* Convert Unicode to normal chars (assume top bits are 0),
 	   ala UTF-8 */

A message that is not in the archive (sent off-list or not yet received): [email protected]