diff options
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 61fdaf02f251..88de771d3569 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -785,7 +785,7 @@ struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, gfp_t gfp_mask) | |||
785 | * end-of-list | 785 | * end-of-list |
786 | */ | 786 | */ |
787 | if (!left) | 787 | if (!left) |
788 | sg_mark_end(sgl, this); | 788 | sg_mark_end(&sgl[this - 1]); |
789 | 789 | ||
790 | /* | 790 | /* |
791 | * don't allow subsequent mempool allocs to sleep, it would | 791 | * don't allow subsequent mempool allocs to sleep, it would |