[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <40c7b561-46f3-6a83-401d-7a6b1bf57219@kernel.org>
Date: Thu, 3 Feb 2022 09:35:50 +0100
From: Jiri Slaby <jirislaby@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/1] amiserial: Drop duplicate NULL check in shutdown()
On 02. 02. 22, 17:56, Andy Shevchenko wrote:
> The free_page(addr), which becomes free_pages(addr, 0) checks addr
> against 0. No need to repeat this check in the caller.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Acked-by: Jiri Slaby <jirislaby@...nel.org>
> ---
> drivers/tty/amiserial.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
> index 1e60dbef676c..533d02b38e02 100644
> --- a/drivers/tty/amiserial.c
> +++ b/drivers/tty/amiserial.c
> @@ -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;
> - }
> + free_page((unsigned long)info->xmit.buf);
> + info->xmit.buf = NULL;
>
> info->IER = 0;
> amiga_custom.intena = IF_RBF | IF_TBE;
--
js
suse labs
Powered by blists - more mailing lists