From f654b23c173eb7081e1f5bd33710a53c11ea4b49 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Thu, 28 Sep 2017 11:07:40 +0100 Subject: [PATCH] serial: imx: Use RX_BUF_SIZE to set size of RX buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The imx serial driver uses PAGE_SIZE when allocating rx_buf, but then uses RX_BUF_SIZE (which is currently defined as PAGE_SIZE) to describe the length of the buffer when initialising the scatter gather list. In order to ensure that this stays consistent, use RX_BUF_SIZE in both locations. Signed-off-by: Martyn Welch Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index a42f386..9800fda 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1166,7 +1166,7 @@ static int imx_uart_dma_init(struct imx_port *sport) goto err; } - sport->rx_buf = kzalloc(PAGE_SIZE, GFP_KERNEL); + sport->rx_buf = kzalloc(RX_BUF_SIZE, GFP_KERNEL); if (!sport->rx_buf) { ret = -ENOMEM; goto err; -- 2.7.4