From: Nishanth Menon <nm@ti.com>
To: Suman Anna <s-anna@ti.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Matt Mackall <mpm@selenic.com>,
Deepak Saxena <dsaxena@plexity.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Paul Walmsley <paul@pwsan.com>
Subject: Re: [PATCH] hwrng: OMAP: Fix assumption that runtime_get_sync will always succeed
Date: Fri, 24 Jun 2016 11:46:58 -0500 [thread overview]
Message-ID: <576D6402.1090201@ti.com> (raw)
In-Reply-To: <576D6156.2050508@ti.com>
On 06/24/2016 11:35 AM, Suman Anna wrote:
[...]
>> diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
>> index 8a1432e8bb80..f30a1870cb64 100644
>> --- a/drivers/char/hw_random/omap-rng.c
>> +++ b/drivers/char/hw_random/omap-rng.c
>> @@ -384,7 +384,11 @@ static int omap_rng_probe(struct platform_device *pdev)
>> }
>>
>> pm_runtime_enable(&pdev->dev);
>> - pm_runtime_get_sync(&pdev->dev);
>> + ret = pm_runtime_get_sync(&pdev->dev);
>> + if (ret) {
>> + dev_err(&pdev->dev, "Failed to runtime_get device: %d\n", ret);
>> + goto err_ioremap;
>
> You need to also add a pm_runtime_put_noidle() on get_sync failures to
> balance the device's power usage_count.
>
Crap, yep, I should have known better. thanks for catching it.. v2
incoming..
--
Regards,
Nishanth Menon
WARNING: multiple messages have this Message-ID (diff)
From: nm@ti.com (Nishanth Menon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] hwrng: OMAP: Fix assumption that runtime_get_sync will always succeed
Date: Fri, 24 Jun 2016 11:46:58 -0500 [thread overview]
Message-ID: <576D6402.1090201@ti.com> (raw)
In-Reply-To: <576D6156.2050508@ti.com>
On 06/24/2016 11:35 AM, Suman Anna wrote:
[...]
>> diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
>> index 8a1432e8bb80..f30a1870cb64 100644
>> --- a/drivers/char/hw_random/omap-rng.c
>> +++ b/drivers/char/hw_random/omap-rng.c
>> @@ -384,7 +384,11 @@ static int omap_rng_probe(struct platform_device *pdev)
>> }
>>
>> pm_runtime_enable(&pdev->dev);
>> - pm_runtime_get_sync(&pdev->dev);
>> + ret = pm_runtime_get_sync(&pdev->dev);
>> + if (ret) {
>> + dev_err(&pdev->dev, "Failed to runtime_get device: %d\n", ret);
>> + goto err_ioremap;
>
> You need to also add a pm_runtime_put_noidle() on get_sync failures to
> balance the device's power usage_count.
>
Crap, yep, I should have known better. thanks for catching it.. v2
incoming..
--
Regards,
Nishanth Menon
next prev parent reply other threads:[~2016-06-24 16:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-24 15:57 [PATCH] hwrng: OMAP: Fix assumption that runtime_get_sync will always succeed Nishanth Menon
2016-06-24 15:57 ` Nishanth Menon
2016-06-24 15:57 ` Nishanth Menon
2016-06-24 16:35 ` Suman Anna
2016-06-24 16:35 ` Suman Anna
2016-06-24 16:46 ` Nishanth Menon [this message]
2016-06-24 16:46 ` Nishanth Menon
-- strict thread matches above, loose matches on Subject: below --
2016-06-24 16:50 [PATCH V2] " Nishanth Menon
2016-06-24 16:50 ` [PATCH] " Nishanth Menon
2016-06-24 16:50 ` Nishanth Menon
2016-06-24 16:50 ` Nishanth Menon
2016-06-24 16:54 ` Nishanth Menon
2016-06-24 16:54 ` Nishanth Menon
2016-06-24 16:54 ` Nishanth Menon
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=576D6402.1090201@ti.com \
--to=nm@ti.com \
--cc=dsaxena@plexity.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=paul@pwsan.com \
--cc=s-anna@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.