Commit d15ec0b4 authored by Lihua Yao's avatar Lihua Yao Committed by Takashi Iwai

ALSA: ac97: fix check of pm_runtime_get_sync failure

pm_runtime_get_sync returns negative on failure.

Fixes: 74426fbf ("ALSA: ac97: add an ac97 bus")
Signed-off-by: default avatarLihua Yao <ylhuajnu@163.com>
Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c7b81707
...@@ -529,7 +529,7 @@ static int ac97_bus_remove(struct device *dev) ...@@ -529,7 +529,7 @@ static int ac97_bus_remove(struct device *dev)
int ret; int ret;
ret = pm_runtime_get_sync(dev); ret = pm_runtime_get_sync(dev);
if (ret) if (ret < 0)
return ret; return ret;
ret = adrv->remove(adev); ret = adrv->remove(adev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment