* [PATCH] ARM: rockchip: pm: Fix PTR_ERR() argument
@ 2015-08-14 2:43 Fabio Estevam
2015-08-14 17:37 ` Matthias Brugger
2015-08-24 10:40 ` Heiko Stuebner
0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2015-08-14 2:43 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@freescale.com>
PTR_ERR should access the value just tested by IS_ERR.
The semantic patch that makes this change is available
in scripts/coccinelle/tests/odd_ptr_err.cocci.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
arch/arm/mach-rockchip/pm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-rockchip/pm.c b/arch/arm/mach-rockchip/pm.c
index 892bace..01123dd 100644
--- a/arch/arm/mach-rockchip/pm.c
+++ b/arch/arm/mach-rockchip/pm.c
@@ -224,14 +224,14 @@ static int rk3288_suspend_init(struct device_node *np)
"rockchip,rk3288-sgrf");
if (IS_ERR(sgrf_regmap)) {
pr_err("%s: could not find sgrf regmap\n", __func__);
- return PTR_ERR(pmu_regmap);
+ return PTR_ERR(sgrf_regmap);
}
grf_regmap = syscon_regmap_lookup_by_compatible(
"rockchip,rk3288-grf");
if (IS_ERR(grf_regmap)) {
pr_err("%s: could not find grf regmap\n", __func__);
- return PTR_ERR(pmu_regmap);
+ return PTR_ERR(grf_regmap);
}
sram_np = of_find_compatible_node(NULL, NULL,
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] ARM: rockchip: pm: Fix PTR_ERR() argument
2015-08-14 2:43 [PATCH] ARM: rockchip: pm: Fix PTR_ERR() argument Fabio Estevam
@ 2015-08-14 17:37 ` Matthias Brugger
2015-08-24 10:40 ` Heiko Stuebner
1 sibling, 0 replies; 3+ messages in thread
From: Matthias Brugger @ 2015-08-14 17:37 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday, August 13, 2015 11:43:19 PM Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> PTR_ERR should access the value just tested by IS_ERR.
>
> The semantic patch that makes this change is available
> in scripts/coccinelle/tests/odd_ptr_err.cocci.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> arch/arm/mach-rockchip/pm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/pm.c b/arch/arm/mach-rockchip/pm.c
> index 892bace..01123dd 100644
> --- a/arch/arm/mach-rockchip/pm.c
> +++ b/arch/arm/mach-rockchip/pm.c
> @@ -224,14 +224,14 @@ static int rk3288_suspend_init(struct device_node *np)
> "rockchip,rk3288-sgrf");
> if (IS_ERR(sgrf_regmap)) {
> pr_err("%s: could not find sgrf regmap\n", __func__);
> - return PTR_ERR(pmu_regmap);
> + return PTR_ERR(sgrf_regmap);
> }
>
> grf_regmap = syscon_regmap_lookup_by_compatible(
> "rockchip,rk3288-grf");
> if (IS_ERR(grf_regmap)) {
> pr_err("%s: could not find grf regmap\n", __func__);
> - return PTR_ERR(pmu_regmap);
> + return PTR_ERR(grf_regmap);
> }
>
> sram_np = of_find_compatible_node(NULL, NULL,
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH] ARM: rockchip: pm: Fix PTR_ERR() argument
2015-08-14 2:43 [PATCH] ARM: rockchip: pm: Fix PTR_ERR() argument Fabio Estevam
2015-08-14 17:37 ` Matthias Brugger
@ 2015-08-24 10:40 ` Heiko Stuebner
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2015-08-24 10:40 UTC (permalink / raw)
To: linux-arm-kernel
Am Donnerstag, 13. August 2015, 23:43:19 schrieb Fabio Estevam:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> PTR_ERR should access the value just tested by IS_ERR.
>
> The semantic patch that makes this change is available
> in scripts/coccinelle/tests/odd_ptr_err.cocci.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
applied to my soc branch.
Thanks for the catch
Heiko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-24 10:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 2:43 [PATCH] ARM: rockchip: pm: Fix PTR_ERR() argument Fabio Estevam
2015-08-14 17:37 ` Matthias Brugger
2015-08-24 10:40 ` Heiko Stuebner
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).