diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/bsg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/bsg.c b/block/bsg.c index c4f49e255751..b7e42ad55361 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -606,7 +606,7 @@ bsg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) | |||
606 | ret = __bsg_read(buf, count, bd, NULL, &bytes_read); | 606 | ret = __bsg_read(buf, count, bd, NULL, &bytes_read); |
607 | *ppos = bytes_read; | 607 | *ppos = bytes_read; |
608 | 608 | ||
609 | if (!bytes_read || (bytes_read && err_block_err(ret))) | 609 | if (!bytes_read || err_block_err(ret)) |
610 | bytes_read = ret; | 610 | bytes_read = ret; |
611 | 611 | ||
612 | return bytes_read; | 612 | return bytes_read; |
@@ -686,7 +686,7 @@ bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) | |||
686 | /* | 686 | /* |
687 | * return bytes written on non-fatal errors | 687 | * return bytes written on non-fatal errors |
688 | */ | 688 | */ |
689 | if (!bytes_written || (bytes_written && err_block_err(ret))) | 689 | if (!bytes_written || err_block_err(ret)) |
690 | bytes_written = ret; | 690 | bytes_written = ret; |
691 | 691 | ||
692 | dprintk("%s: returning %Zd\n", bd->name, bytes_written); | 692 | dprintk("%s: returning %Zd\n", bd->name, bytes_written); |