[dm-devel] [PATCH] dm: cleanup: remove the unnecessary NULL set to the local var *t after kfreed in dm_table_create
Wang Sheng-Hui
shhuiw at gmail.com
Fri Jan 4 00:26:52 UTC 2013
If allocation fails, the local var *t is not used any more after kfreed.
Don't need to reset it to NULL. Remove the unnecesary NULL set here.
Signed-off-by: Wang Sheng-Hui <shhuiw at gmail.com>
---
drivers/md/dm-table.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index daf25d0..c95405d 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -217,7 +217,6 @@ int dm_table_create(struct dm_table **result,
fmode_t mode,
if (alloc_targets(t, num_targets)) {
kfree(t);
- t = NULL;
return -ENOMEM;
}
--
1.7.10.4
More information about the dm-devel
mailing list