Skip to content

Commit

Permalink
atmel_serial: fix broken RX buffer allocation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Haavard Skinnemoen authored and Linus Torvalds committed Feb 8, 2008
1 parent a667061 commit 6433471
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6433471

Please sign in to comment.