diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-05-30 06:02:59 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-05-30 06:03:01 +0200 |
commit | ff6bacd6f4adeb5ec1eb90f299706c67e2e4fc99 (patch) | |
tree | 93bbca28f955246041b6e46fbe4e5bdcf1f8fdc5 /common | |
parent | 949b03dfb16a48b873831e58f580dec14a91e679 (diff) | |
download | barebox-ff6bacd6f4adeb5ec1eb90f299706c67e2e4fc99.tar.gz barebox-ff6bacd6f4adeb5ec1eb90f299706c67e2e4fc99.tar.xz |
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/block.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |