diff options
author | Liu Gang <Gang.Liu@freescale.com> | 2014-04-09 06:04:45 -0400 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-05-22 19:08:13 -0400 |
commit | 1c075f95504b77e80d6e491fef8f89a001164ded (patch) | |
tree | 24cf4bbb418e901cb6435fe36cb86ad6ab72f413 | |
parent | e57eeae4e6453be952d066519466858b5f64d19c (diff) |
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>
-rw-r--r-- | arch/powerpc/sysdev/fsl_rmu.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) | |||
881 | rc = request_irq(IRQ_RIO_RX(mport), fsl_rio_rx_handler, 0, | 881 | rc = request_irq(IRQ_RIO_RX(mport), fsl_rio_rx_handler, 0, |
882 | "msg_rx", (void *)mport); | 882 | "msg_rx", (void *)mport); |
883 | if (rc < 0) { | 883 | if (rc < 0) { |
884 | dma_free_coherent(priv->dev, RIO_MSG_BUFFER_SIZE, | 884 | dma_free_coherent(priv->dev, |
885 | rmu->msg_tx_ring.virt_buffer[i], | 885 | rmu->msg_rx_ring.size * RIO_MAX_MSG_SIZE, |
886 | rmu->msg_tx_ring.phys_buffer[i]); | 886 | rmu->msg_rx_ring.virt, rmu->msg_rx_ring.phys); |
887 | goto out; | 887 | goto out; |
888 | } | 888 | } |
889 | 889 | ||