mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
skd: Fix size argument in skd_free_skcomp()
Pass the correct size to pci_free_consistent() in skd_free_skcomp(). Signed-off-by: Bart 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: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
6f7c76753a
commit
7f13bdad2a
@ -4252,14 +4252,9 @@ err_out:
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user