diff options
Diffstat (limited to 'drivers/block/mtip32xx/mtip32xx.c')
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 847107ef0cce..20dd52a2f92f 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
@@ -3002,7 +3002,8 @@ static int mtip_hw_debugfs_init(struct driver_data *dd) | |||
3002 | 3002 | ||
3003 | static void mtip_hw_debugfs_exit(struct driver_data *dd) | 3003 | static void mtip_hw_debugfs_exit(struct driver_data *dd) |
3004 | { | 3004 | { |
3005 | debugfs_remove_recursive(dd->dfs_node); | 3005 | if (dd->dfs_node) |
3006 | debugfs_remove_recursive(dd->dfs_node); | ||
3006 | } | 3007 | } |
3007 | 3008 | ||
3008 | 3009 | ||
@@ -3863,7 +3864,7 @@ static void mtip_make_request(struct request_queue *queue, struct bio *bio) | |||
3863 | struct driver_data *dd = queue->queuedata; | 3864 | struct driver_data *dd = queue->queuedata; |
3864 | struct scatterlist *sg; | 3865 | struct scatterlist *sg; |
3865 | struct bio_vec *bvec; | 3866 | struct bio_vec *bvec; |
3866 | int nents = 0; | 3867 | int i, nents = 0; |
3867 | int tag = 0, unaligned = 0; | 3868 | int tag = 0, unaligned = 0; |
3868 | 3869 | ||
3869 | if (unlikely(dd->dd_flag & MTIP_DDF_STOP_IO)) { | 3870 | if (unlikely(dd->dd_flag & MTIP_DDF_STOP_IO)) { |
@@ -3921,11 +3922,12 @@ static void mtip_make_request(struct request_queue *queue, struct bio *bio) | |||
3921 | } | 3922 | } |
3922 | 3923 | ||
3923 | /* Create the scatter list for this bio. */ | 3924 | /* Create the scatter list for this bio. */ |
3924 | bio_for_each_segment(bvec, bio, nents) { | 3925 | bio_for_each_segment(bvec, bio, i) { |
3925 | sg_set_page(&sg[nents], | 3926 | sg_set_page(&sg[nents], |
3926 | bvec->bv_page, | 3927 | bvec->bv_page, |
3927 | bvec->bv_len, | 3928 | bvec->bv_len, |
3928 | bvec->bv_offset); | 3929 | bvec->bv_offset); |
3930 | nents++; | ||
3929 | } | 3931 | } |
3930 | 3932 | ||
3931 | /* Issue the read/write. */ | 3933 | /* Issue the read/write. */ |