Skip to content

Commit

Permalink
efi: remove "kfree(NULL)"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Matt Fleming committed Apr 30, 2013
1 parent 85c9071 commit 7b2dd6d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/firmware/efi/efivars.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 7b2dd6d

Please sign in to comment.