Skip to content

Commit

Permalink
dm table: simplify call to free_devices
Browse files Browse the repository at this point in the history
free_devices in dm_table.c already uses list_for_each(), so we don't
need to check if the list is empty.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Hannes Reinecke authored and Alasdair G Kergon committed Mar 28, 2012
1 parent fe878f3 commit 574ce07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ void dm_table_destroy(struct dm_table *t)
vfree(t->highs);

/* free the device list */
if (t->devices.next != &t->devices)
free_devices(&t->devices);
free_devices(&t->devices);

dm_free_md_mempools(t->mempools);

Expand Down

0 comments on commit 574ce07

Please sign in to comment.