From: Liu Gang Date: Wed, 9 Apr 2014 10:04:45 +0000 (+0800) Subject: powerpc/rmu: Fix the error memory free parameters X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1c075f95504b77e80d6e491fef8f89a001164ded;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git powerpc/rmu: Fix the error memory free parameters There are error parameters should be corrected when calling dma_free_coherent to free rmu rx-ring buffers in fsl_open_inb_mbox() function. Signed-off-by: Liu Gang Reported-by: Dan Carpenter Signed-off-by: Scott Wood --- diff --git a/arch/powerpc/sysdev/fsl_rmu.c b/arch/powerpc/sysdev/fsl_rmu.c index 00e224a1048c..b48197ae44d0 100644 --- a/arch/powerpc/sysdev/fsl_rmu.c +++ b/arch/powerpc/sysdev/fsl_rmu.c @@ -881,9 +881,9 @@ fsl_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) rc = request_irq(IRQ_RIO_RX(mport), fsl_rio_rx_handler, 0, "msg_rx", (void *)mport); if (rc < 0) { - dma_free_coherent(priv->dev, RIO_MSG_BUFFER_SIZE, - rmu->msg_tx_ring.virt_buffer[i], - rmu->msg_tx_ring.phys_buffer[i]); + dma_free_coherent(priv->dev, + rmu->msg_rx_ring.size * RIO_MAX_MSG_SIZE, + rmu->msg_rx_ring.virt, rmu->msg_rx_ring.phys); goto out; }