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 cab535809d0d..7a91ca3d32a6 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -621,7 +621,7 @@ static void scsi_free_sgtable(struct scatterlist *sgl, int index) | |||
621 | { | 621 | { |
622 | struct scsi_host_sg_pool *sgp; | 622 | struct scsi_host_sg_pool *sgp; |
623 | 623 | ||
624 | BUG_ON(index > SG_MEMPOOL_NR); | 624 | BUG_ON(index >= SG_MEMPOOL_NR); |
625 | 625 | ||
626 | sgp = scsi_sg_pools + index; | 626 | sgp = scsi_sg_pools + index; |
627 | mempool_free(sgl, sgp->pool); | 627 | mempool_free(sgl, sgp->pool); |