From 7b2dd6d2c4db3912771bfcfd7ac7264011a3c831 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 30 Apr 2013 10:43:44 +0300 Subject: efi: remove "kfree(NULL)" No need to free a NULL pointer. Signed-off-by: Dan Carpenter Signed-off-by: Matt Fleming --- drivers/firmware/efi/efivars.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c index f8f5e5d..5e94897 100644 --- a/drivers/firmware/efi/efivars.c +++ b/drivers/firmware/efi/efivars.c @@ -419,10 +419,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 */ -- cgit v1.1