efi: remove "kfree(NULL)"
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 30 Apr 2013 07:43:44 +0000 (10:43 +0300)
committerMatt Fleming <matt.fleming@intel.com>
Tue, 30 Apr 2013 15:03:18 +0000 (16:03 +0100)
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>
drivers/firmware/efi/efivars.c

index f8f5e5d9e020013802e6f6464874d6ffd8cb5feb..5e94897244cff22f56d83d97411a4df36e78a89f 100644 (file)
@@ -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 */