From: Dan Carpenter Date: Tue, 30 Apr 2013 07:43:44 +0000 (+0300) Subject: efi: remove "kfree(NULL)" X-Git-Tag: v3.10-rc1~130^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7b2dd6d2c4db3912771bfcfd7ac7264011a3c831;p=karo-tx-linux.git efi: remove "kfree(NULL)" No need to free a NULL pointer. Signed-off-by: Dan Carpenter Signed-off-by: Matt Fleming --- diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c index f8f5e5d9e020..5e94897244cf 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 */