diff options
author | Jingchang Lu <jingchang.lu@freescale.com> | 2014-09-28 08:35:30 (GMT) |
---|---|---|
committer | Matthew Weigel <Matthew.Weigel@freescale.com> | 2014-12-11 18:38:51 (GMT) |
commit | e7ed0d9b024402edac5f1f4a17e619d45e2bc393 (patch) | |
tree | 9fe2d7f173401e57e440fe5dba305e1f80c2d666 /drivers/tty | |
parent | 9d6673a9b828c23ae39d8c5b66022f6d4ba135f2 (diff) | |
download | linux-fsl-qoriq-e7ed0d9b024402edac5f1f4a17e619d45e2bc393.tar.xz |
tty: of-serial: fixup info uninitialized bug
The kmalloc space may cause info->clk have random value
if the dts node doesn't define clk property, thus cause
all if(info->clk) condition wrong.
Signed-off-by: Jingchang Lu <jingchang.lu@freescale.com>
Change-Id: I309ff5cc881e00dc4475649e050263243027326c
Reviewed-on: http://git.am.freescale.net:8181/21934
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/of_serial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index a320fc5..58be230 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c @@ -159,7 +159,7 @@ static int of_platform_serial_probe(struct platform_device *ofdev) if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL)) return -EBUSY; - info = kmalloc(sizeof(*info), GFP_KERNEL); + info = kzalloc(sizeof(*info), GFP_KERNEL); if (info == NULL) return -ENOMEM; |