ALSA: ac97: fix check of pm_runtime_get_sync failure
PATCH 1/2 ALSA: ac97: fix check of pm_runtime_get_sync failure
From: Lihua Yao <[email protected]>
pm_runtime_get_sync returns negative on failure.
Fixes 74426fbff66e ("ALSA: ac97: add an ac97 bus")
Signed-off-by Lihua Yao <[email protected]>
--- sound/ac97/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/ac97/bus.c +1 -1
@@ -503,7 +503,7 @@ static int ac97_bus_remove(struct device *dev)int ret; ret =pm_runtime_get_sync (dev); -if (ret) +if (ret <0 )return ret; ret = adrv->remove (adev);
Signature · 1 line
2.17.1
PATCH 2/2 ALSA: ac97: fix unbalanced pm_runtime_enable
From: Lihua Yao <[email protected]>
Runtime PM is enabled at ac97_bus_probe() and should be disabled at ac97_bus_remove().
Fixes 74426fbff66e ("ALSA: ac97: add an ac97 bus")
Signed-off-by Lihua Yao <[email protected]>
--- sound/ac97/bus.c | 2 ++ 1 file changed, 2 insertions(+)
sound/ac97/bus.c +2 -0
@@ -511,6 +511,8 @@ static int ac97_bus_remove(struct device *dev)if (ret ==0 )ac97_put_disable_clk (adev); +pm_runtime_disable (dev); +return ret; }
Signature · 1 line
2.17.1
Takashi Iwai
AppliedRe: [PATCH 2/2] ALSA: ac97: fix unbalanced pm_runtime_enable
Quoted 8 lines · On Wed, 15 Aug 2018 17:20:35 +0200, [email protected] wrote:
From: Lihua Yao <[email protected]>
Runtime PM is enabled at
ac97_bus_probe()and should be disabled atac97_bus_remove().Fixes 74426fbff66e ("ALSA: ac97: add an ac97 bus")Signed-off-by Lihua Yao <[email protected]>
Applied, thanks.
Takashi
Takashi Iwai
AppliedQuoted 7 lines · On Wed, 15 Aug 2018 17:20:34 +0200, [email protected] wrote:
From: Lihua Yao <[email protected]>
pm_runtime_get_syncreturns negative on failure.Fixes 74426fbff66e ("ALSA: ac97: add an ac97 bus")Signed-off-by Lihua Yao <[email protected]>
Applied, thanks.
Takashi