From ff6bacd6f4adeb5ec1eb90f299706c67e2e4fc99 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 30 May 2012 06:02:59 +0200 Subject: block: do not BUG() on failed block_get It does not necessarily means a bug when block_get fails here, this can also be a failure on the underlying device. Signed-off-by: Sascha Hauer --- common/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/block.c b/common/block.c index 437dc95cea..5983171635 100644 --- a/common/block.c +++ b/common/block.c @@ -245,7 +245,7 @@ static int block_put(struct block_device *blk, const void *buf, int block) data = block_get(blk, block); if (IS_ERR(data)) - BUG(); + return PTR_ERR(data); memcpy(data, buf, 1 << blk->blockbits); -- cgit v1.2.3