summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2012-03-28 19:41:24 +0200
committerAlasdair G Kergon <agk@redhat.com>2012-03-28 19:41:24 +0200
commit574ce07eb0014069f1da763c219bb30ea4c266ec (patch)
treef5f5543a30f2e2937cfd96dea28ae17f4b0c9544 /drivers/md/dm-table.c
parentdm thin: correct comments (diff)
downloadlinux-574ce07eb0014069f1da763c219bb30ea4c266ec.tar.xz
linux-574ce07eb0014069f1da763c219bb30ea4c266ec.zip
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>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c3
1 files changed, 1 insertions, 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);