[alsa-devel] [PATCH 1/2] ALSA: ac97: fix check of pm_runtime_get_sync failure
From: Lihua Yao ylhuajnu@163.com
pm_runtime_get_sync returns negative on failure.
Fixes: 74426fbff66e ("ALSA: ac97: add an ac97 bus") Signed-off-by: Lihua Yao ylhuajnu@163.com --- sound/ac97/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c index 31f858eceffc..c267e44fefa0 100644 --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -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);
From: Lihua Yao ylhuajnu@163.com
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 ylhuajnu@163.com --- sound/ac97/bus.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c index c267e44fefa0..83eed9d7f679 100644 --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -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; }
On Wed, 15 Aug 2018 17:20:35 +0200, ylhuajnu@163.com wrote:
From: Lihua Yao ylhuajnu@163.com
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 ylhuajnu@163.com
Applied, thanks.
Takashi
On Wed, 15 Aug 2018 17:20:34 +0200, ylhuajnu@163.com wrote:
From: Lihua Yao ylhuajnu@163.com
pm_runtime_get_sync returns negative on failure.
Fixes: 74426fbff66e ("ALSA: ac97: add an ac97 bus") Signed-off-by: Lihua Yao ylhuajnu@163.com
Applied, thanks.
Takashi
participants (2)
-
Takashi Iwai
-
ylhuajnu@163.com