]> git.baikalelectronics.ru Git - kernel.git/commit
tty: vcc: Drop impossible to hit WARN_ON
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 14 Jan 2021 17:57:18 +0000 (18:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Jan 2021 09:21:42 +0000 (10:21 +0100)
commit1b4da810160759f37d1ae993e48b7251717ef8ed
tree92443c03d4fa3b03fff4f9013b1121a21dd2a5db
parent343cc7636f70ac0b6322e3933fcbc13fd4260c94
tty: vcc: Drop impossible to hit WARN_ON

vcc_get() returns the port that has provided port->index. As the port that
is about to be removed isn't removed yet this trivially will find this
port. So simplify the call to not assign an identical value to the port
pointer and drop the warning that is never hit.

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20210114175718.137483-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vcc.c