aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfsplus/wrapper.c')
-rw-r--r--fs/hfsplus/wrapper.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 3031d81f5f0f..4ac88ff79aa6 100644
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@@ -36,6 +36,7 @@ int hfsplus_submit_bio(struct block_device *bdev, sector_t sector,
36{ 36{
37 DECLARE_COMPLETION_ONSTACK(wait); 37 DECLARE_COMPLETION_ONSTACK(wait);
38 struct bio *bio; 38 struct bio *bio;
39 int ret = 0;
39 40
40 bio = bio_alloc(GFP_NOIO, 1); 41 bio = bio_alloc(GFP_NOIO, 1);
41 bio->bi_sector = sector; 42 bio->bi_sector = sector;
@@ -54,8 +55,10 @@ int hfsplus_submit_bio(struct block_device *bdev, sector_t sector,
54 wait_for_completion(&wait); 55 wait_for_completion(&wait);
55 56
56 if (!bio_flagged(bio, BIO_UPTODATE)) 57 if (!bio_flagged(bio, BIO_UPTODATE))
57 return -EIO; 58 ret = -EIO;
58 return 0; 59
60 bio_put(bio);
61 return ret;
59} 62}
60 63
61static int hfsplus_read_mdb(void *bufptr, struct hfsplus_wd *wd) 64static int hfsplus_read_mdb(void *bufptr, struct hfsplus_wd *wd)