Message ID | 20240515184832.121949-1-bmarzins@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | dm: remove unneeded kvfree from alloc_targets | expand |
On Wed, 15 May 2024, Benjamin Marzinski wrote: > alloc_targets() is always called with a newly initialized table where > t->highs == NULL. > > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Reviewed-by: Mikulas Patocka <mpatocka@redhat.com> > --- > 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 88114719fe18..d124e37dfb00 100644 > --- a/drivers/md/dm-table.c > +++ b/drivers/md/dm-table.c > @@ -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; > -- > 2.45.0 >
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 88114719fe18..d124e37dfb00 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -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;
alloc_targets() is always called with a newly initialized table where t->highs == NULL. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> --- drivers/md/dm-table.c | 1 - 1 file changed, 1 deletion(-)