aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-04-30 03:43:44 -0400
committerMatt Fleming <matt.fleming@intel.com>2013-04-30 11:03:18 -0400
commit7b2dd6d2c4db3912771bfcfd7ac7264011a3c831 (patch)
treee61eb7b1b702d53ab122318eacdc89274e0fa9ba /drivers/firmware
parent85c90716aae49f05a67c757df7b8c413256103f2 (diff)
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)
419 419
420 short_name = kzalloc(short_name_size, GFP_KERNEL); 420 short_name = kzalloc(short_name_size, GFP_KERNEL);
421 421
422 if (!short_name) { 422 if (!short_name)
423 kfree(short_name);
424 return 1; 423 return 1;
425 }
426 424
427 /* Convert Unicode to normal chars (assume top bits are 0), 425 /* Convert Unicode to normal chars (assume top bits are 0),
428 ala UTF-8 */ 426 ala UTF-8 */