* [PATCH] mtd:elm: Use correct check on return value of pm_runtime_get_sync
@ 2014-02-05 13:42 Stefan Sørensen
2014-02-05 14:17 ` Nishanth Menon
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Sørensen @ 2014-02-05 13:42 UTC (permalink / raw)
To: avinashphilip, linux-omap; +Cc: Stefan Sørensen
The ELM driver incorrectly reagard any non-zero return value from
pm_runtime_get_sync as an error, but it may return 1 if the device
was already active. Fix to only error when return value is negative.
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
---
drivers/mtd/devices/elm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
index d1dd6a3..e2c073c 100644
--- a/drivers/mtd/devices/elm.c
+++ b/drivers/mtd/devices/elm.c
@@ -380,7 +380,7 @@ static int elm_probe(struct platform_device *pdev)
}
pm_runtime_enable(&pdev->dev);
- if (pm_runtime_get_sync(&pdev->dev)) {
+ if (pm_runtime_get_sync(&pdev->dev) < 0) {
ret = -EINVAL;
pm_runtime_disable(&pdev->dev);
dev_err(&pdev->dev, "can't enable clock\n");
--
1.8.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd:elm: Use correct check on return value of pm_runtime_get_sync
2014-02-05 13:42 [PATCH] mtd:elm: Use correct check on return value of pm_runtime_get_sync Stefan Sørensen
@ 2014-02-05 14:17 ` Nishanth Menon
0 siblings, 0 replies; 2+ messages in thread
From: Nishanth Menon @ 2014-02-05 14:17 UTC (permalink / raw)
To: Stefan Sørensen, linux-omap
-avinash
On 02/05/2014 07:42 AM, Stefan Sørensen wrote:
> The ELM driver incorrectly reagard any non-zero return value from
> pm_runtime_get_sync as an error, but it may return 1 if the device
> was already active. Fix to only error when return value is negative.
>
> Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
> ---
> drivers/mtd/devices/elm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
> index d1dd6a3..e2c073c 100644
> --- a/drivers/mtd/devices/elm.c
> +++ b/drivers/mtd/devices/elm.c
> @@ -380,7 +380,7 @@ static int elm_probe(struct platform_device *pdev)
> }
>
> pm_runtime_enable(&pdev->dev);
> - if (pm_runtime_get_sync(&pdev->dev)) {
> + if (pm_runtime_get_sync(&pdev->dev) < 0) {
> ret = -EINVAL;
> pm_runtime_disable(&pdev->dev);
> dev_err(&pdev->dev, "can't enable clock\n");
>
Though unrelated to specifically this, elm_resume has a get_sync
without error check..
Further, you might want to cc the mailing lists generated by
./scripts/get_maintainer.pl
--
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-05 14:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 13:42 [PATCH] mtd:elm: Use correct check on return value of pm_runtime_get_sync Stefan Sørensen
2014-02-05 14:17 ` Nishanth Menon
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).