diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-28 06:33:15 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-06-01 12:04:35 -0400 |
commit | e29df91e67428c1a651d18df6ec047fcb30282d3 (patch) | |
tree | e8a40c8a37ffcfe36b18a2f4f31d71cf24cade27 /drivers/sfi | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
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>
Diffstat (limited to 'drivers/sfi')
-rw-r--r-- | drivers/sfi/sfi_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/sfi/sfi_core.c b/drivers/sfi/sfi_core.c index 005195958647..ceba593dc84f 100644 --- a/drivers/sfi/sfi_core.c +++ b/drivers/sfi/sfi_core.c | |||
@@ -441,8 +441,10 @@ struct sfi_table_attr __init *sfi_sysfs_install_table(u64 pa) | |||
441 | 441 | ||
442 | ret = sysfs_create_bin_file(tables_kobj, | 442 | ret = sysfs_create_bin_file(tables_kobj, |
443 | &tbl_attr->attr); | 443 | &tbl_attr->attr); |
444 | if (ret) | 444 | if (ret) { |
445 | kfree(tbl_attr); | 445 | kfree(tbl_attr); |
446 | tbl_attr = NULL; | ||
447 | } | ||
446 | 448 | ||
447 | sfi_unmap_table(th); | 449 | sfi_unmap_table(th); |
448 | return tbl_attr; | 450 | return tbl_attr; |