Commit 7f13bdad authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

skd: Fix size argument in skd_free_skcomp()

Pass the correct size to pci_free_consistent() in skd_free_skcomp().
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 6f7c7675
......@@ -4252,14 +4252,9 @@ static struct skd_device *skd_construct(struct pci_dev *pdev)
static void skd_free_skcomp(struct skd_device *skdev)
{
if (skdev->skcomp_table != NULL) {
u32 nbytes;
nbytes = sizeof(skdev->skcomp_table[0]) *
SKD_N_COMPLETION_ENTRY;
pci_free_consistent(skdev->pdev, nbytes,
if (skdev->skcomp_table)
pci_free_consistent(skdev->pdev, SKD_SKCOMP_SIZE,
skdev->skcomp_table, skdev->cq_dma_address);
}
skdev->skcomp_table = NULL;
skdev->cq_dma_address = 0;
......
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