Skip to content

Commit

Permalink
dm table: remove superfluous variable reset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wang Sheng-Hui authored and Alasdair G Kergon committed Mar 1, 2013
1 parent f13945d commit d2ce70a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d2ce70a

Please sign in to comment.