Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1430809
| From | Nishanth Menon <nm@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] hwrng: OMAP: Fix assumption that runtime_get_sync will always succeed |
| Date | 2016-06-24 18:50 +0200 |
| Message-ID | <rNCsN-28b-19@gated-at.bofh.it> (permalink) |
| References | <rNBGq-1Ax-25@gated-at.bofh.it> <rNCj8-22X-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] hwrng: OMAP: Fix assumption that runtime_get_sync will always succeed Nishanth Menon <nm@ti.com> - 2016-06-24 18:00 +0200
Re: [PATCH] hwrng: OMAP: Fix assumption that runtime_get_sync will always succeed Suman Anna <s-anna@ti.com> - 2016-06-24 18:40 +0200
Re: [PATCH] hwrng: OMAP: Fix assumption that runtime_get_sync will always succeed Nishanth Menon <nm@ti.com> - 2016-06-24 18:50 +0200
csiph-web