Skip to content
Commit 3c5b2f5b authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

tty: Drop duplicate NULL check in TTY port functions



The free_page(addr), which becomes free_pages(addr, 0) checks addr against 0.
No need to repeat this check in the callers, i.e.  tty_port_free_xmit_buf()
and tty_port_destructor().

Note, INIT_KFIFO() is safe without that check, because it operates on
a separate member and doesn't rely on the FIFO itself to be allocated.

Acked-by: default avatarJiri Slaby <jirislaby@kernel.org>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220204153253.11006-1-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 916acbf6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment