mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthias Brugger <matthias.bgg@gmail.com>
To: Himanshu Jha <himanshujha199640@gmail.com>, gregkh@linuxfoundation.org
Cc: jslaby@suse.com, linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO
Date: Sun, 27 Aug 2017 21:49:38 +0300	[thread overview]
Message-ID: <a9a1bd05-cdcf-1273-9229-20b963a97128@gmail.com> (raw)
In-Reply-To: <1503815501-9205-1-git-send-email-himanshujha199640@gmail.com>



On 08/27/2017 09:31 AM, Himanshu Jha wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> ---
>   drivers/tty/serial/8250/8250_mtk.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
> index ce0cc47..fb45770 100644
> --- a/drivers/tty/serial/8250/8250_mtk.c
> +++ b/drivers/tty/serial/8250/8250_mtk.c
> @@ -171,10 +171,7 @@ static int mtk8250_probe_of(struct platform_device *pdev, struct uart_port *p,
>   	}
>   
>   	data->bus_clk = devm_clk_get(&pdev->dev, "bus");
> -	if (IS_ERR(data->bus_clk))
> -		return PTR_ERR(data->bus_clk);
> -
> -	return 0;
> +	return PTR_ERR_OR_ZERO(data->bus_clk);
>   }
>   

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

      reply	other threads:[~2017-08-27 18:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27  6:31 Himanshu Jha
2017-08-27 18:49 ` Matthias Brugger [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=a9a1bd05-cdcf-1273-9229-20b963a97128@gmail.com \
    --to=matthias.bgg@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=himanshujha199640@gmail.com \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@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®