summaryrefslogtreecommitdiffstats
path: root/drivers/serial/atmel_serial.c
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2008-02-08 04:21:07 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:22:37 -0800
commit6433471d33c09d69d029b1c4b7bdd1612c492587 (patch)
treea6baa8c2b489d7d13b0941747eb03ded7bd86de1 /drivers/serial/atmel_serial.c
parenta66706158d6bc4d9eb29c37852001f78f4c8989c (diff)
downloadblackbird-op-linux-6433471d33c09d69d029b1c4b7bdd1612c492587.tar.gz
blackbird-op-linux-6433471d33c09d69d029b1c4b7bdd1612c492587.zip
atmel_serial: fix broken RX buffer allocation
Introduced by atmel_serial-split-the-interrupt-handler.patch. Thanks to michael <trimarchi@gandalf.sssup.it> for spotting it. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial/atmel_serial.c')
-rw-r--r--drivers/serial/atmel_serial.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index d15ab2243289..e08fe64e4466 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;
OpenPOWER on IntegriCloud