From c1499a044d7c2bbd9ea3d9c17e17f16595ae6d69 Mon Sep 17 00:00:00 2001 From: ZhangXiaoxu Date: Sun, 9 Jun 2019 15:52:00 +0800 Subject: dm space map common: remove check for impossible sm_find_free() return value The function sm_find_free() just returns -ENOSPC and 0. So remove lone caller's check for some other error. Signed-off-by: ZhangXiaoxu Signed-off-by: Mike Snitzer --- drivers/md/persistent-data/dm-space-map-common.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/md') diff --git a/drivers/md/persistent-data/dm-space-map-common.c b/drivers/md/persistent-data/dm-space-map-common.c index b8a62188f6be..bd68f6fef694 100644 --- a/drivers/md/persistent-data/dm-space-map-common.c +++ b/drivers/md/persistent-data/dm-space-map-common.c @@ -369,10 +369,6 @@ int sm_ll_find_free_block(struct ll_disk *ll, dm_block_t begin, */ dm_tm_unlock(ll->tm, blk); continue; - - } else if (r < 0) { - dm_tm_unlock(ll->tm, blk); - return r; } dm_tm_unlock(ll->tm, blk); -- cgit v1.2.3-58-ga151