dm table: remove superfluous variable reset
authorWang Sheng-Hui <shhuiw@gmail.com>
Fri, 1 Mar 2013 22:45:45 +0000 (22:45 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 1 Mar 2013 22:45:45 +0000 (22:45 +0000)
If allocation fails, the local var *t is not used any more after kfree.
Don't need to reset it to NULL. Remove the unnecesary NULL set here.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-table.c

index daf25d0890b3d6cdf9852b739593648f00b86425..c95405d04726630ddfcd227781333c5dbbe8a956 100644 (file)
@@ -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;
        }