mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
48479148a2
commit
c2b703b807
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue