aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/scsi_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 621dee8b8cb2..10506f9cd0c9 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -632,7 +632,7 @@ static void scsi_free_sgtable(struct scatterlist *sgl, int index)
632{ 632{
633 struct scsi_host_sg_pool *sgp; 633 struct scsi_host_sg_pool *sgp;
634 634
635 BUG_ON(index > SG_MEMPOOL_NR); 635 BUG_ON(index >= SG_MEMPOOL_NR);
636 636
637 sgp = scsi_sg_pools + index; 637 sgp = scsi_sg_pools + index;
638 mempool_free(sgl, sgp->pool); 638 mempool_free(sgl, sgp->pool);