summaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-04-30 10:43:44 +0300
committerMatt Fleming <matt.fleming@intel.com>2013-04-30 16:03:18 +0100
commit7b2dd6d2c4db3912771bfcfd7ac7264011a3c831 (patch)
treee61eb7b1b702d53ab122318eacdc89274e0fa9ba /drivers/firmware
parent85c90716aae49f05a67c757df7b8c413256103f2 (diff)
downloadlinux-7b2dd6d2c4db3912771bfcfd7ac7264011a3c831.tar.bz2
efi: remove "kfree(NULL)"
No need to free a NULL pointer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/efi/efivars.c4
1 files changed, 1 insertions, 3 deletions
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 */