* [PATCH] OMAP: omap3_pm_get_suspend_state() error ignored in pwrdm_suspend_get()
@ 2009-12-16 16:22 Roel Kluin
2009-12-16 17:23 ` Kevin Hilman
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-12-16 16:22 UTC (permalink / raw)
To: linux-pm, Pavel Machek, linux-omap@vger.kernel.org, Tony Lindgren,
Andrew Morton
val is an u64 pointer, we need an int to check the error.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Found using coccinelle: http://coccinelle.lip6.fr/
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 860b755..081ca85 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -488,9 +488,11 @@ int pm_dbg_regset_init(int reg_set)
static int pwrdm_suspend_get(void *data, u64 *val)
{
- *val = omap3_pm_get_suspend_state((struct powerdomain *)data);
+ int ret;
+ ret = omap3_pm_get_suspend_state((struct powerdomain *)data);
+ *val = ret;
- if (*val >= 0)
+ if (ret >= 0)
return 0;
return *val;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] OMAP: omap3_pm_get_suspend_state() error ignored in pwrdm_suspend_get()
2009-12-16 16:22 [PATCH] OMAP: omap3_pm_get_suspend_state() error ignored in pwrdm_suspend_get() Roel Kluin
@ 2009-12-16 17:23 ` Kevin Hilman
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Hilman @ 2009-12-16 17:23 UTC (permalink / raw)
To: Roel Kluin
Cc: linux-pm, Pavel Machek, linux-omap@vger.kernel.org, Tony Lindgren,
Andrew Morton, LKML
Roel Kluin <roel.kluin@gmail.com> writes:
> val is an u64 pointer, we need an int to check the error.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Thanks, will queue this in my PM fixes queue for .33-rc series.
Kevin
> ---
> Found using coccinelle: http://coccinelle.lip6.fr/
>
> diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
> index 860b755..081ca85 100644
> --- a/arch/arm/mach-omap2/pm-debug.c
> +++ b/arch/arm/mach-omap2/pm-debug.c
> @@ -488,9 +488,11 @@ int pm_dbg_regset_init(int reg_set)
>
> static int pwrdm_suspend_get(void *data, u64 *val)
> {
> - *val = omap3_pm_get_suspend_state((struct powerdomain *)data);
> + int ret;
> + ret = omap3_pm_get_suspend_state((struct powerdomain *)data);
> + *val = ret;
>
> - if (*val >= 0)
> + if (ret >= 0)
> return 0;
> return *val;
> }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-16 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-16 16:22 [PATCH] OMAP: omap3_pm_get_suspend_state() error ignored in pwrdm_suspend_get() Roel Kluin
2009-12-16 17:23 ` Kevin Hilman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox