aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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;