[PATCH 09/13] ASoC: codecs: lpass: Discard pm_runtime_put_autosuspend() return values

From: Brian Norris

Date: Tue Oct 06 2026 - 19:26:56 EST


Printing warning messages on pm_runtime_put_autosuspend() returning
negative values is not particularly useful.

Returning an error code from pm_runtime_put_autosuspend() merely means
that it has not queued up a timer or work item to check whether or not
the device can be suspended and there are many perfectly valid
situations in which that can happen, like after writing "on" to the
device's runtime PM "control" attribute in sysfs for one example.

Accordingly, update the LPASS macro codec drivers to simply discard the
return value of pm_runtime_put_autosuspend().

This will facilitate a planned change of the
pm_runtime_put_autosuspend() return type to void in the future, similar
to commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return
type to void").

Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>
---
This patch is independent of the rest of the series, except for the end
(changing the return type). I expect it can be applied by individual
maintainers, and we pick up the end once the dust is settled.

sound/soc/codecs/lpass-rx-macro.c | 4 +---
sound/soc/codecs/lpass-tx-macro.c | 4 +---
sound/soc/codecs/lpass-va-macro.c | 17 ++++-------------
sound/soc/codecs/lpass-wsa-macro.c | 8 ++------
4 files changed, 8 insertions(+), 25 deletions(-)

diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index 282a6aaa9986..e6c27893584c 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -3917,9 +3917,7 @@ static int rx_macro_probe(struct platform_device *pdev)
if (ret)
goto err_rpm_put;

- ret = pm_runtime_put_autosuspend(dev);
- if (ret < 0)
- dev_warn(dev, "runtime PM put failed after probe: %d\n", ret);
+ pm_runtime_put_autosuspend(dev);

return 0;

diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c
index a8e83eb60ba2..149373384a15 100644
--- a/sound/soc/codecs/lpass-tx-macro.c
+++ b/sound/soc/codecs/lpass-tx-macro.c
@@ -2370,9 +2370,7 @@ static int tx_macro_probe(struct platform_device *pdev)
if (ret)
goto err_rpm_put;

- ret = pm_runtime_put_autosuspend(dev);
- if (ret < 0)
- dev_warn(dev, "runtime PM put failed after probe: %d\n", ret);
+ pm_runtime_put_autosuspend(dev);

return 0;

diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
index dbc5795b9273..48139119b335 100644
--- a/sound/soc/codecs/lpass-va-macro.c
+++ b/sound/soc/codecs/lpass-va-macro.c
@@ -1352,7 +1352,7 @@ static int fsgen_gate_enable(struct clk_hw *hw)
{
struct va_macro *va = to_va_macro(hw);
struct regmap *regmap = va->regmap;
- int ret, rpm_ret;
+ int ret;

ret = pm_runtime_resume_and_get(va->dev);
if (ret < 0)
@@ -1360,11 +1360,7 @@ static int fsgen_gate_enable(struct clk_hw *hw)

ret = va_macro_mclk_enable(va, true);
if (ret) {
- rpm_ret = pm_runtime_put_autosuspend(va->dev);
- if (rpm_ret < 0)
- dev_warn(va->dev,
- "runtime PM put failed in fsgen enable unwind: %d\n",
- rpm_ret);
+ pm_runtime_put_autosuspend(va->dev);
return ret;
}
if (va->has_swr_master)
@@ -1378,7 +1374,6 @@ static void fsgen_gate_disable(struct clk_hw *hw)
{
struct va_macro *va = to_va_macro(hw);
struct regmap *regmap = va->regmap;
- int ret;

if (va->has_swr_master)
regmap_update_bits(regmap, CDC_VA_CLK_RST_CTRL_SWR_CONTROL,
@@ -1386,9 +1381,7 @@ static void fsgen_gate_disable(struct clk_hw *hw)

va_macro_mclk_enable(va, false);

- ret = pm_runtime_put_autosuspend(va->dev);
- if (ret < 0)
- dev_warn(va->dev, "runtime PM put failed in fsgen disable: %d\n", ret);
+ pm_runtime_put_autosuspend(va->dev);
}

static int fsgen_gate_is_enabled(struct clk_hw *hw)
@@ -1693,9 +1686,7 @@ static int va_macro_probe(struct platform_device *pdev)
goto err_rpm_put;
}

- rpm_ret = pm_runtime_put_autosuspend(dev);
- if (rpm_ret < 0)
- dev_warn(dev, "runtime PM put failed after probe: %d\n", rpm_ret);
+ pm_runtime_put_autosuspend(dev);

return 0;

diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c
index cfd2ac0a6cda..60d285a2040f 100644
--- a/sound/soc/codecs/lpass-wsa-macro.c
+++ b/sound/soc/codecs/lpass-wsa-macro.c
@@ -2548,9 +2548,7 @@ static int wsa_swrm_clock(struct wsa_macro *wsa, bool enable)
CDC_WSA_SWR_CLK_EN_MASK, 0);
wsa_macro_mclk_enable(wsa, false);

- ret = pm_runtime_put_autosuspend(wsa->dev);
- if (ret < 0)
- dev_warn(wsa->dev, "runtime PM put failed: %d\n", ret);
+ pm_runtime_put_autosuspend(wsa->dev);
}

return 0;
@@ -2820,9 +2818,7 @@ static int wsa_macro_probe(struct platform_device *pdev)
if (ret)
goto err_rpm_put;

- ret = pm_runtime_put_autosuspend(dev);
- if (ret < 0)
- dev_warn(dev, "runtime PM put failed after probe: %d\n", ret);
+ pm_runtime_put_autosuspend(dev);

return 0;
err_rpm_put:
--
2.56.0.360.g66cac248cb-goog