Skip to content

Commit e29df91

Browse files
error27lenb
authored andcommitted
SFI: do not return freed pointer
We never actually use the return value of sfi_sysfs_install_table() but it still seems wrong to return a freed pointer. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 67a3e12 commit e29df91

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/sfi/sfi_core.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,10 @@ struct sfi_table_attr __init *sfi_sysfs_install_table(u64 pa)
441441

442442
ret = sysfs_create_bin_file(tables_kobj,
443443
&tbl_attr->attr);
444-
if (ret)
444+
if (ret) {
445445
kfree(tbl_attr);
446+
tbl_attr = NULL;
447+
}
446448

447449
sfi_unmap_table(th);
448450
return tbl_attr;

0 commit comments

Comments
 (0)