Commit e29df91e authored by Dan Carpenter's avatar Dan Carpenter Committed by Len Brown

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 67a3e12b
...@@ -441,8 +441,10 @@ struct sfi_table_attr __init *sfi_sysfs_install_table(u64 pa) ...@@ -441,8 +441,10 @@ struct sfi_table_attr __init *sfi_sysfs_install_table(u64 pa)
ret = sysfs_create_bin_file(tables_kobj, ret = sysfs_create_bin_file(tables_kobj,
&tbl_attr->attr); &tbl_attr->attr);
if (ret) if (ret) {
kfree(tbl_attr); kfree(tbl_attr);
tbl_attr = NULL;
}
sfi_unmap_table(th); sfi_unmap_table(th);
return tbl_attr; return tbl_attr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment