Skip to content

Commit

Permalink
ARM: rockchip: pm: Fix PTR_ERR() argument
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
  • Loading branch information
Fabio Estevam authored and Heiko Stuebner committed Aug 24, 2015
1 parent 9bb91ae commit 2a03c02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-rockchip/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,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,
Expand Down

0 comments on commit 2a03c02

Please sign in to comment.