mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
serial: ifx6x60: fix memory leak
If tty_register_driver() failed then tty_driver is still alive. Free it with put_tty_driver(). Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
badb9533ab
commit
a4fb0b228e
1 changed files with 1 additions and 0 deletions
|
@ -1384,6 +1384,7 @@ static int __init ifx_spi_init(void)
|
|||
if (result) {
|
||||
pr_err("%s: tty_register_driver failed(%d)",
|
||||
DRVNAME, result);
|
||||
put_tty_driver(tty_drv);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue