From: Rafael J. Wysocki Date: Mon, 22 Dec 2025 20:35:33 +0000 (+0100) Subject: ASoC: rockchip: Discard pm_runtime_put() return value X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f92d27a6ee158c43e276712af23c79997780471a;p=thirdparty%2Fkernel%2Flinux.git ASoC: rockchip: Discard pm_runtime_put() return value It is better to check directly whether or not CONFIG_PM has been enabled instead of relying on an error value returned by pm_runtime_put() in that case because pm_runtime_put() may also return an error value in other cases, like after writing "on" to the devices' runtime PM "control" attribute in sysfs for one example. This will facilitate a planned change of the pm_runtime_put() return type to void in the future. Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/5160923.0VBMTVartN@rafael.j.wysocki Signed-off-by: Mark Brown --- diff --git a/sound/soc/rockchip/rockchip_sai.c b/sound/soc/rockchip/rockchip_sai.c index ebdf0056065b9..1bf614dbdf4d0 100644 --- a/sound/soc/rockchip/rockchip_sai.c +++ b/sound/soc/rockchip/rockchip_sai.c @@ -1487,8 +1487,9 @@ static int rockchip_sai_probe(struct platform_device *pdev) return 0; err_runtime_suspend: - /* If we're !CONFIG_PM, we get -ENOSYS and disable manually */ - if (pm_runtime_put(&pdev->dev)) + if (IS_ENABLED(CONFIG_PM)) + pm_runtime_put(&pdev->dev); + else rockchip_sai_runtime_suspend(&pdev->dev); return ret;