[PATCH 05/16] md/bitmap: Return directly after a failed bitmap_storage_alloc() in bitmap_resize()

From: SF Markus Elfring
Date: Tue Sep 27 2016 - 12:51:37 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Sep 2016 14:47:29 +0200

Return directly after a memory allocation failed in this function
at the beginning.

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/md/bitmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index c278865..5092bc0 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -2032,7 +2032,7 @@ int bitmap_resize(struct bitmap *bitmap, sector_t blocks,
mddev_is_clustered(bitmap->mddev)
? bitmap->cluster_slot : 0);
if (ret)
- goto err;
+ return ret;

pages = DIV_ROUND_UP(chunks, PAGE_COUNTER_RATIO);

--
2.10.0