One fix on which rest of the patches are based on (context changes). Not tested on hardware.
Best regards, Krzysztof
--- Krzysztof Kozlowski (5): can: c_can: Fix unbalanced runtime PM disable in error path can: c_can: Drop useless final probe failure message can: c_can: Simplify handling syscon error path can: c_can: Use of_property_present() to test existence of DT property can: c_can: Use syscon_regmap_lookup_by_phandle_args
drivers/net/can/c_can/c_can_platform.c | 56 +++++++++++----------------------- 1 file changed, 18 insertions(+), 38 deletions(-) --- base-commit: df04532eb4413cfaf33a8a902d208f596ba7c1b0 change-id: 20250112-syscon-phandle-args-can-bd0b2067c4ad
Best regards,
Runtime PM is enabled as one of the last steps of probe(), so all earlier gotos to "exit_free_device" label were not correct and were leading to unbalanced runtime PM disable depth.
Fixes: 6e2fe01dd6f9 ("can: c_can: move runtime PM enable/disable to c_can_platform") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- drivers/net/can/c_can/c_can_platform.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index 6cba9717a6d87db3d779a31afd6966162094f452..399844809bbeaad42e19b4003b85fc487b01d336 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -385,15 +385,16 @@ static int c_can_plat_probe(struct platform_device *pdev) if (ret) { dev_err(&pdev->dev, "registering %s failed (err=%d)\n", KBUILD_MODNAME, ret); - goto exit_free_device; + goto exit_pm_runtime; }
dev_info(&pdev->dev, "%s device registered (regs=%p, irq=%d)\n", KBUILD_MODNAME, priv->base, dev->irq); return 0;
-exit_free_device: +exit_pm_runtime: pm_runtime_disable(priv->device); +exit_free_device: free_c_can_dev(dev); exit: dev_err(&pdev->dev, "probe failed\n");
Thanks for the clean-up!
On 12/01/2025 at 21:41, Krzysztof Kozlowski wrote:
One fix on which rest of the patches are based on (context changes). Not tested on hardware.
Best regards, Krzysztof
Krzysztof Kozlowski (5): can: c_can: Fix unbalanced runtime PM disable in error path can: c_can: Drop useless final probe failure message can: c_can: Simplify handling syscon error path can: c_can: Use of_property_present() to test existence of DT property can: c_can: Use syscon_regmap_lookup_by_phandle_args
drivers/net/can/c_can/c_can_platform.c | 56 +++++++++++----------------------- 1 file changed, 18 insertions(+), 38 deletions(-)
For the series:
Reviewed-by: Vincent Mailhol mailhol.vincent@wanadoo.fr
Yours sincerely, Vincent Mailhol
linux-stable-mirror@lists.linaro.org