Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: abailon@baylibre.com (Alexandre Bailon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: davinci: da8xx: Fix sleeping function called from invalid context
Date: Thu, 1 Dec 2016 18:04:09 +0100	[thread overview]
Message-ID: <c669eae7-b7be-47d8-777a-481e3ff64d3e@baylibre.com> (raw)
In-Reply-To: <2968058.oO7jkWYDV8@wuerfel>

On 12/01/2016 03:59 PM, Arnd Bergmann wrote:
> 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
> 
I didn't know that one.
I will use it.

Thanks,
Alexandre

      reply	other threads:[~2016-12-01 17:04 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
2016-12-01 17:04     ` Alexandre Bailon [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=c669eae7-b7be-47d8-777a-481e3ff64d3e@baylibre.com \
    --to=abailon@baylibre.com \
    --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