diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 16:19:23 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 17:55:47 -0400 |
commit | 03e0edf946a08f498788bb6e8ab58453d98f25b9 (patch) | |
tree | c2e849aa122c4428be3b4faaeb416dafb9376e11 /drivers/block/xen-blkback/blkback.c | |
parent | 41ca4d388560d2048c7b64ff5ca7dc3bac0d0812 (diff) |
xen/blkback: Checkpatch.pl recommend against multiple assigments.
CHECK: multiple assignments should be avoided
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/block/xen-blkback/blkback.c')
-rw-r--r-- | drivers/block/xen-blkback/blkback.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 453b51ac737..362fbf6f656 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -620,10 +620,11 @@ static int dispatch_rw_block_io(struct blkif_st *blkif, seg[i].nsec << 9, seg[i].buf & ~PAGE_MASK) == 0)) { - bio = biolist[nbio++] = bio_alloc(GFP_KERNEL, nseg-i); + bio = bio_alloc(GFP_KERNEL, nseg-i); if (unlikely(bio == NULL)) goto fail_put_bio; + biolist[nbio++] = bio; bio->bi_bdev = preq.bdev; bio->bi_private = pending_req; bio->bi_end_io = end_block_io_op; @@ -636,10 +637,12 @@ static int dispatch_rw_block_io(struct blkif_st *blkif, /* This will be hit if the operation was a flush. */ if (!bio) { BUG_ON(operation != WRITE_FLUSH); - bio = biolist[nbio++] = bio_alloc(GFP_KERNEL, 0); + + bio = bio_alloc(GFP_KERNEL, 0); if (unlikely(bio == NULL)) goto fail_put_bio; + biolist[nbio++] = bio; bio->bi_bdev = preq.bdev; bio->bi_private = pending_req; bio->bi_end_io = end_block_io_op; @@ -677,7 +680,7 @@ static int dispatch_rw_block_io(struct blkif_st *blkif, return -EIO; fail_put_bio: - for (i = 0; i < (nbio-1); i++) + for (i = 0; i < nbio; i++) bio_put(biolist[i]); __end_block_io_op(pending_req, -EINVAL); msleep(1); /* back off a bit */ |