Commit a5e3faf1 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

amiserial: Drop duplicate NULL check in shutdown()



The free_page(addr), which becomes free_pages(addr, 0) checks addr
against 0. No need to repeat this check in the caller.

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/20220202165655.5647-1-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0fc58931
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -538,10 +538,8 @@ static void shutdown(struct tty_struct *tty, struct serial_state *info)
	 */
	free_irq(IRQ_AMIGA_VERTB, info);

	if (info->xmit.buf) {
	free_page((unsigned long)info->xmit.buf);
	info->xmit.buf = NULL;
	}

	info->IER = 0;
	amiga_custom.intena = IF_RBF | IF_TBE;