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>
This commit is contained in:
parent
949b03dfb1
commit
ff6bacd6f4
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue