[PATCH] pinctrl: rockchip: Check the error of the pmu syscon lookup

Heiko Stübner heiko at sntech.de
Tue Dec 1 04:13:46 PST 2026


Am Dienstag, 1. Dezember 2026, 12:33:49 Mitteleuropäische Normalzeit schrieb Anton Protopopov:
> The syscon_regmap_lookup_by_phandle_optional() function returns NULL
> only when the property is missing (-ENODEV). On other errors it
> returns an error pointer. Before commit dbd2317d7b9f ("pinctrl:
> rockchip: Add rk3506 pinctrl support") the probe returned the error
> of the "rockchip,pmu" lookup. Now it stores the error pointer in
> info->regmap_pmu. The pin configuration code then uses an error
> pointer as a regmap, which leads to an oops.
> 
> The lookup may fail with a correct device tree too: it returns
> -EPROBE_DEFER when the hwspinlock of the syscon or the driver which
> registers its regmap is not probed yet. Return the error from the
> probe, so that it is retried.
> 
> Fixes: dbd2317d7b9f ("pinctrl: rockchip: Add rk3506 pinctrl support")
> Suggested-by: Bjorn Helgaas <bhelgaas at google.com>
> Signed-off-by: Anton Protopopov <a.s.protopopov at gmail.com>

Looked up the behaviour of syscon_regmap_lookup_by_phandle_optional(),
so for the change itself:

Reviewed-by: Heiko Stuebner <heiko at sntech.de>


(had a bit of fun, remembering that the 2nd syscon handling was removed
by commit 9884c330dd80 ("pinctrl: rockchip: Fix RK3506 pinctrl support") )

Thanks
Heiko





More information about the Linux-rockchip mailing list