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@xxxxxxxxx>
---
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
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel