aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/sh-sci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/sh-sci.c')
-rw-r--r--drivers/serial/sh-sci.c5
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)
1025 s->chan_rx = NULL; 1025 s->chan_rx = NULL;
1026 s->cookie_rx[0] = s->cookie_rx[1] = -EINVAL; 1026 s->cookie_rx[0] = s->cookie_rx[1] = -EINVAL;
1027 dma_release_channel(chan); 1027 dma_release_channel(chan);
1028 dma_free_coherent(port->dev, s->buf_len_rx * 2, 1028 if (sg_dma_address(&s->sg_rx[0]))
1029 sg_virt(&s->sg_rx[0]), sg_dma_address(&s->sg_rx[0])); 1029 dma_free_coherent(port->dev, s->buf_len_rx * 2,
1030 sg_virt(&s->sg_rx[0]), sg_dma_address(&s->sg_rx[0]));
1030 if (enable_pio) 1031 if (enable_pio)
1031 sci_start_rx(port); 1032 sci_start_rx(port);
1032} 1033}