Commit bfb4809f authored by Sakthivel K's avatar Sakthivel K Committed by James Bottomley

[SCSI] pm80xx: fix for memory region free

All memory regions are allocated based on variables total_len
and alignment but free was based on element_size.
Signed-off-by: default avatarSakthivel K <DL.Team.PMC.SPC.Linux.open.source@pmcs.com>
Signed-off-by: default avatarAnand Kumar S <DL.Team.PMC.SPC.Linux.open.source@pmcs.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 5eca4a67
......@@ -140,7 +140,8 @@ static void pm8001_free(struct pm8001_hba_info *pm8001_ha)
for (i = 0; i < USI_MAX_MEMCNT; i++) {
if (pm8001_ha->memoryMap.region[i].virt_ptr != NULL) {
pci_free_consistent(pm8001_ha->pdev,
pm8001_ha->memoryMap.region[i].element_size,
(pm8001_ha->memoryMap.region[i].total_len +
pm8001_ha->memoryMap.region[i].alignment),
pm8001_ha->memoryMap.region[i].virt_ptr,
pm8001_ha->memoryMap.region[i].phys_addr);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment