[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5160923.0VBMTVartN@rafael.j.wysocki>
Date: Mon, 22 Dec 2025 21:35:33 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Ulf Hansson <ulf.hansson@...aro.org>,
Brian Norris <briannorris@...omium.org>,
Nicolas Frattaroli <nicolas.frattaroli@...labora.com>,
Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Heiko Stuebner <heiko@...ech.de>, linux-rockchip@...ts.infradead.org,
linux-sound@...r.kernel.org
Subject:
[PATCH v1 22/23] ASoC: rockchip: Discard pm_runtime_put() return value
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
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 <rafael.j.wysocki@...el.com>
---
This patch is part of a series, but it doesn't depend on anything else
in that series. The last patch in the series depends on it.
It can be applied by itself and if you decide to do so, please let me
know.
Otherwise, an ACK or equivalent will be appreciated, but also the lack
of specific criticism will be eventually regarded as consent.
---
sound/soc/rockchip/rockchip_sai.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/sound/soc/rockchip/rockchip_sai.c
+++ b/sound/soc/rockchip/rockchip_sai.c
@@ -1487,8 +1487,9 @@ static int rockchip_sai_probe(struct pla
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;
Powered by blists - more mailing lists