From: Greg KH <gregkh@linuxfoundation.org>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: alan@linux.intel.com, jslaby@suse.cz, grant.likely@secretlab.ca,
rob.herring@calxeda.com, yongjun_wei@trendmicro.com.cn,
linux-serial@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH -next] serial: xilinx_uartps: fix return value check in xuartps_probe()
Date: Tue, 15 Jan 2013 23:07:07 -0800 [thread overview]
Message-ID: <20130116070707.GA18089@kroah.com> (raw)
In-Reply-To: <CAPgLHd-upT_0ThHxU9rXtsw6CP4vU8zvOnLp6u0ZC_2unpDbTw@mail.gmail.com>
On Sun, Dec 02, 2012 at 05:12:43AM -0500, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> In case of error, function of_clk_get() returns ERR_PTR()
> and never returns NULL. The NULL test in the return value
> check should be replaced with IS_ERR().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>
>
> ---
> drivers/tty/serial/xilinx_uartps.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
> index 2be22a2..1eb4657 100644
> --- a/drivers/tty/serial/xilinx_uartps.c
> +++ b/drivers/tty/serial/xilinx_uartps.c
> @@ -948,9 +948,9 @@ static int xuartps_probe(struct platform_device *pdev)
> struct clk *clk;
>
> clk = of_clk_get(pdev->dev.of_node, 0);
> - if (!clk) {
> + if (IS_ERR(clk)) {
> dev_err(&pdev->dev, "no clock specified\n");
> - return -ENODEV;
> + return PTR_ERR(clk);
> }
This patch doesn't apply at all to my tree, what am I doing wrong?
greg k-h
prev parent reply other threads:[~2013-01-16 7:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-02 10:12 [PATCH -next] serial: xilinx_uartps: fix return value check in xuartps_probe() Wei Yongjun
2012-12-05 23:57 ` Grant Likely
2013-01-16 7:07 ` Greg KH [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=20130116070707.GA18089@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alan@linux.intel.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=jslaby@suse.cz \
--cc=linux-serial@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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;
as well as URLs for NNTP newsgroup(s).