Skip to content

Commit 2a03c02

Browse files
Fabio Estevammmind
authored andcommitted
ARM: rockchip: pm: Fix PTR_ERR() argument
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 <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]>
1 parent 9bb91ae commit 2a03c02

File tree

1 file changed

+2
-2
lines changed
  • arch/arm/mach-rockchip

1 file changed

+2
-2
lines changed

arch/arm/mach-rockchip/pm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,14 @@ static int rk3288_suspend_init(struct device_node *np)
246246
"rockchip,rk3288-sgrf");
247247
if (IS_ERR(sgrf_regmap)) {
248248
pr_err("%s: could not find sgrf regmap\n", __func__);
249-
return PTR_ERR(pmu_regmap);
249+
return PTR_ERR(sgrf_regmap);
250250
}
251251

252252
grf_regmap = syscon_regmap_lookup_by_compatible(
253253
"rockchip,rk3288-grf");
254254
if (IS_ERR(grf_regmap)) {
255255
pr_err("%s: could not find grf regmap\n", __func__);
256-
return PTR_ERR(pmu_regmap);
256+
return PTR_ERR(grf_regmap);
257257
}
258258

259259
sram_np = of_find_compatible_node(NULL, NULL,

0 commit comments

Comments
 (0)