]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
If allocation fails, the local var *t is not used any more after kfree.
authorWang Sheng-Hui <shhuiw@gmail.com>
Wed, 13 Feb 2013 22:42:35 +0000 (09:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 13 Feb 2013 22:42:35 +0000 (09:42 +1100)
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;
        }