diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-05-31 06:14:26 +0200 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-31 06:14:26 +0200 |
commit | d5b732b17ca2fc74f370bdba5aae6c804fac8c35 (patch) | |
tree | 4facc6d96116b032a3c1cb2ced9b2a3008e9216e /drivers/serial/sh-sci.c | |
parent | ARM: mach-shmobile: SH7372 has 6 SCIFA and 1 SCIFB ports (diff) | |
parent | Linux 2.6.35-rc1 (diff) | |
download | linux-d5b732b17ca2fc74f370bdba5aae6c804fac8c35.tar.xz linux-d5b732b17ca2fc74f370bdba5aae6c804fac8c35.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/serial/sh-sci.c')
-rw-r--r-- | drivers/serial/sh-sci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index aaef223df676..c291b3add1d2 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -1025,8 +1025,9 @@ static void sci_rx_dma_release(struct sci_port *s, bool enable_pio) s->chan_rx = NULL; s->cookie_rx[0] = s->cookie_rx[1] = -EINVAL; dma_release_channel(chan); - dma_free_coherent(port->dev, s->buf_len_rx * 2, - sg_virt(&s->sg_rx[0]), sg_dma_address(&s->sg_rx[0])); + if (sg_dma_address(&s->sg_rx[0])) + dma_free_coherent(port->dev, s->buf_len_rx * 2, + sg_virt(&s->sg_rx[0]), sg_dma_address(&s->sg_rx[0])); if (enable_pio) sci_start_rx(port); } |