From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: davinci: da8xx: Fix sleeping function called from invalid context
Date: Thu, 01 Dec 2016 15:59:17 +0100 [thread overview]
Message-ID: <2968058.oO7jkWYDV8@wuerfel> (raw)
In-Reply-To: <ed09fc5e-395a-5e72-4928-5e85cdc7f2c3@ti.com>
On Thursday, December 1, 2016 7:47:12 PM CET Sekhar Nori wrote:
>
> > @@ -287,9 +281,15 @@ int __init da8xx_register_usb20_phy_clk(bool use_usb_refclkin)
> > struct clk *parent;
> > int ret = 0;
> >
> > + usb20_clk = clk_get(&da8xx_usb20_dev.dev, "usb20");
> > + if (IS_ERR(usb20_clk))
> > + return PTR_ERR(parent);
>
> Typo here. Should be PTR_ERR(usb20_clk)
I found that doing
err = PTR_ERR_OR_ZERO(usb20_clk);
if (err)
return err;
is less error-prone and leads to better object code.
Arnd
next prev parent reply other threads:[~2016-12-01 14:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 16:48 [PATCH v2] ARM: davinci: da8xx: Fix sleeping function called from invalid context Alexandre Bailon
2016-12-01 14:17 ` Sekhar Nori
2016-12-01 14:59 ` Arnd Bergmann [this message]
2016-12-01 17:04 ` Alexandre Bailon
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=2968058.oO7jkWYDV8@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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