mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ASoC: SDCA: drop pm_runtime reference on probe failure path
sdca_class_probe() takes an extra usage count with
pm_runtime_get_noresume() to keep the device powered on until the
deferred boot work has run. If devm_pm_runtime_enable() then fails,
that reference is never dropped.
Drop it on the error path.
Fixes: 2d877d0659 ("ASoC: SDCA: Add basic SDCA class driver")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20261020073856.1177749-3-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
79cfb5aebb
commit
86331b76b3
|
|
@ -197,8 +197,10 @@ int sdca_class_probe(struct sdw_slave *sdw,
|
|||
pm_runtime_get_noresume(dev);
|
||||
|
||||
ret = devm_pm_runtime_enable(dev);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
pm_runtime_put_sync(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
queue_work(system_long_wq, &drv->boot_work);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user