From 574ce07eb0014069f1da763c219bb30ea4c266ec Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 28 Mar 2012 18:41:24 +0100 Subject: [PATCH] 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 Signed-off-by: Alasdair G Kergon --- drivers/md/dm-table.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 63cc54289aff..a3d1e18317f4 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -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); -- 2.30.2