mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] amiserial: Drop duplicate NULL check in shutdown()
Date: Thu, 3 Feb 2022 09:35:50 +0100	[thread overview]
Message-ID: <40c7b561-46f3-6a83-401d-7a6b1bf57219@kernel.org> (raw)
In-Reply-To: <20220202165655.5647-1-andriy.shevchenko@linux.intel.com>

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@linux.intel.com>

Acked-by: Jiri Slaby <jirislaby@kernel.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

      reply	other threads:[~2022-02-03  8:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 16:56 Andy Shevchenko
2022-02-03  8:35 ` Jiri Slaby [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40c7b561-46f3-6a83-401d-7a6b1bf57219@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®