From: Bart Van Assche Date: Thu, 17 Aug 2017 20:13:03 +0000 (-0700) Subject: skd: Fix size argument in skd_free_skcomp() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f13bdad2a718de63c2a52e18339003ecf4c10ad;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe --- 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;