diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2017-08-17 13:13:03 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-18 08:45:29 -0600 |
commit | 7f13bdad2a718de63c2a52e18339003ecf4c10ad (patch) | |
tree | c4e21ed22e7f441e94aae695c3a76ee17dbf9479 /drivers/block | |
parent | 6f7c76753a1f70d2668a90b28b2318fc16a5f00a (diff) | |
download | linux-stable-7f13bdad2a718de63c2a52e18339003ecf4c10ad.tar.gz linux-stable-7f13bdad2a718de63c2a52e18339003ecf4c10ad.tar.bz2 linux-stable-7f13bdad2a718de63c2a52e18339003ecf4c10ad.zip |
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>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/skd_main.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index 53090a10150f..ab344bfa91c9 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c @@ -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; |