提交 7f13bdad 编写于 作者: B Bart Van Assche 提交者: 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: NBart 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: NJens Axboe <axboe@kernel.dk>
上级 6f7c7675
...@@ -4252,14 +4252,9 @@ static struct skd_device *skd_construct(struct pci_dev *pdev) ...@@ -4252,14 +4252,9 @@ static struct skd_device *skd_construct(struct pci_dev *pdev)
static void skd_free_skcomp(struct skd_device *skdev) static void skd_free_skcomp(struct skd_device *skdev)
{ {
if (skdev->skcomp_table != NULL) { if (skdev->skcomp_table)
u32 nbytes; pci_free_consistent(skdev->pdev, SKD_SKCOMP_SIZE,
nbytes = sizeof(skdev->skcomp_table[0]) *
SKD_N_COMPLETION_ENTRY;
pci_free_consistent(skdev->pdev, nbytes,
skdev->skcomp_table, skdev->cq_dma_address); skdev->skcomp_table, skdev->cq_dma_address);
}
skdev->skcomp_table = NULL; skdev->skcomp_table = NULL;
skdev->cq_dma_address = 0; skdev->cq_dma_address = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册