dm table: simplify call to free_devices

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>
This commit is contained in:
Hannes Reinecke 2012-03-28 18:41:24 +01:00 коммит произвёл Alasdair G Kergon
Родитель fe878f34df
Коммит 574ce07eb0
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -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);