Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <Gang.Liu@freescale.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>

authored by

Liu Gang and committed by
Scott Wood
1c075f95 e57eeae4

+3 -3
+3 -3
arch/powerpc/sysdev/fsl_rmu.c
··· 881 881 rc = request_irq(IRQ_RIO_RX(mport), fsl_rio_rx_handler, 0, 882 882 "msg_rx", (void *)mport); 883 883 if (rc < 0) { 884 - dma_free_coherent(priv->dev, RIO_MSG_BUFFER_SIZE, 885 - rmu->msg_tx_ring.virt_buffer[i], 886 - rmu->msg_tx_ring.phys_buffer[i]); 884 + dma_free_coherent(priv->dev, 885 + rmu->msg_rx_ring.size * RIO_MAX_MSG_SIZE, 886 + rmu->msg_rx_ring.virt, rmu->msg_rx_ring.phys); 887 887 goto out; 888 888 } 889 889