Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15e5bee3 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: cdc-acm: fix potential null-pointer dereference



Must check return value of tty_port_tty_get.

Cc: stable <stable@kernel.org>
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 23b80550
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -533,6 +533,8 @@ static void acm_softint(struct work_struct *work)
	if (!ACM_READY(acm))
		return;
	tty = tty_port_tty_get(&acm->port);
	if (!tty)
		return;
	tty_wakeup(tty);
	tty_kref_put(tty);
}