No need to free a NULL pointer. Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c index 66928a3..7067b56 100644 --- a/drivers/firmware/efi/efivars.c +++ b/drivers/firmware/efi/efivars.c @@ -420,10 +420,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 */ -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html