From: Haavard Skinnemoen Date: Fri, 8 Feb 2008 12:21:07 +0000 (-0800) Subject: atmel_serial: fix broken RX buffer allocation X-Git-Tag: v2.6.25-rc1~112 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=6433471d33c09d69d029b1c4b7bdd1612c492587;p=linux-2.6-omap-h63xx.git atmel_serial: fix broken RX buffer allocation Introduced by atmel_serial-split-the-interrupt-handler.patch. Thanks to michael for spotting it. Signed-off-by: Haavard Skinnemoen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index d15ab224328..e08fe64e446 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c @@ -1469,7 +1469,8 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev) if (!atmel_use_dma_rx(&port->uart)) { ret = -ENOMEM; - data = kmalloc(ATMEL_SERIAL_RINGSIZE, GFP_KERNEL); + data = kmalloc(sizeof(struct atmel_uart_char) + * ATMEL_SERIAL_RINGSIZE, GFP_KERNEL); if (!data) goto err_alloc_ring; port->rx_ring.buf = data;