From e29df91e67428c1a651d18df6ec047fcb30282d3 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 28 May 2010 12:33:15 +0200 Subject: [PATCH] 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 Signed-off-by: Len Brown --- drivers/sfi/sfi_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) ret = sysfs_create_bin_file(tables_kobj, &tbl_attr->attr); - if (ret) + if (ret) { kfree(tbl_attr); + tbl_attr = NULL; + } sfi_unmap_table(th); return tbl_attr;