Hi<br><br><div class="gmail_quote">On Wed, May 30, 2012 at 7:31 AM, Sascha Hauer <span dir="ltr"><<a href="mailto:s.hauer@pengutronix.de" target="_blank">s.hauer@pengutronix.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It does not necessarily means a bug when block_get fails here,<br>
this can also be a failure on the underlying device.<br>
<br>
Signed-off-by: Sascha Hauer <<a href="mailto:s.hauer@pengutronix.de">s.hauer@pengutronix.de</a>><br>
---<br>
common/block.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/common/block.c b/common/block.c<br>
index 437dc95..5983171 100644<br>
--- a/common/block.c<br>
+++ b/common/block.c<br>
@@ -245,7 +245,7 @@ static int block_put(struct block_device *blk, const void *buf, int block)<br>
<br>
data = block_get(blk, block);<br>
if (IS_ERR(data))<br>
- BUG();<br>
+ return PTR_ERR(data);<br>
<br>
memcpy(data, buf, 1 << blk->blockbits);<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.7.10<br>
<br></font></span></blockquote><div><br></div><div>Tested-by: Roberto Nibali <<a href="mailto:rnibali@gmail.com">rnibali@gmail.com</a>></div><div>Acked-by: Roberto Nibali <<a href="mailto:rnibali@gmail.com">rnibali@gmail.com</a>></div>
<div><br></div><div> </div></div><br>