summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorYoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>2014-07-23 10:06:22 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-24 05:56:17 +0400
commitc2b703b807e3aba4d2b542c9096c790186a6e71f (patch)
tree79a1d26e0edd12c1d2d4ff61d35d76c3c8c2b179 /drivers/tty
parent48479148a2f5311a45867469ae43c983bf3b6c88 (diff)
downloadlinux-c2b703b807e3aba4d2b542c9096c790186a6e71f.tar.xz
serial/core: Fix too big allocation for attribute member
Current code allocates too much data for tty_groups member of uart_port struct, so fix it. Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/serial_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 61529a84c3fc..8bb19da01639 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2618,7 +2618,7 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
if (uport->attr_group)
num_groups++;
- uport->tty_groups = kcalloc(num_groups, sizeof(**uport->tty_groups),
+ uport->tty_groups = kcalloc(num_groups, sizeof(*uport->tty_groups),
GFP_KERNEL);
if (!uport->tty_groups) {
ret = -ENOMEM;