dm: remove unneeded kvfree from alloc_targets
Benjamin Marzinski
maintainerPATCH 1/1 dm: remove unneeded kvfree from alloc_targets
alloc_targets() is always called with a newly initialized table where t->highs == NULL.
Signed-off-by Benjamin Marzinski <[email protected]>
--- drivers/md/dm-table.c | 1 - 1 file changed, 1 deletion(-)
drivers/md/dm-table.c +0 -1
@@ -117,7 +117,6 @@ static int alloc_targets(struct dm_table *t, unsigned int num) n_targets = (struct dm_target *) (n_highs + num);memset (n_highs,-1 ,sizeof (*n_highs) * num); -kvfree (t->highs); t->num_allocated = num; t->highs = n_highs;
Signature · 1 line
2.45.0
Quoted 4 lines · Benjamin Marzinski
alloc_targets()is always called with a newly initialized table wheret->highs== NULL.Signed-off-by Benjamin Marzinski <[email protected]>
Reviewed-by Mikulas Patocka <[email protected]>
Quoted 19 lines
--- drivers/md/dm-table.c | 1 - 1 file changed, 1 deletion(-)drivers/md/dm-table.c +0
-1@@ -117,7 +117,6 @@ static int alloc_targets(struct dm_table *t, unsigned int num) n_targets = (struct dm_target *) (n_highs + num);memset (n_highs,-1 ,sizeof (*n_highs) * num); -kvfree (t->highs); t->num_allocated = num; t->highs = n_highs;Signature · 1 line
2.45.0