aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/amba-pl011.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/amba-pl011.c')
-rw-r--r--drivers/serial/amba-pl011.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index 954073c6ce3a..72229df9dc11 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -716,7 +716,7 @@ static int pl011_probe(struct amba_device *dev, void *id)
716 goto out; 716 goto out;
717 } 717 }
718 718
719 uap = kmalloc(sizeof(struct uart_amba_port), GFP_KERNEL); 719 uap = kzalloc(sizeof(struct uart_amba_port), GFP_KERNEL);
720 if (uap == NULL) { 720 if (uap == NULL) {
721 ret = -ENOMEM; 721 ret = -ENOMEM;
722 goto out; 722 goto out;
@@ -728,7 +728,6 @@ static int pl011_probe(struct amba_device *dev, void *id)
728 goto free; 728 goto free;
729 } 729 }
730 730
731 memset(uap, 0, sizeof(struct uart_amba_port));
732 uap->clk = clk_get(&dev->dev, "UARTCLK"); 731 uap->clk = clk_get(&dev->dev, "UARTCLK");
733 if (IS_ERR(uap->clk)) { 732 if (IS_ERR(uap->clk)) {
734 ret = PTR_ERR(uap->clk); 733 ret = PTR_ERR(uap->clk);