summaryrefslogtreecommitdiffstats
path: root/sound/ac97
diff options
context:
space:
mode:
authorLihua Yao2018-08-15 17:20:34 +0200
committerTakashi Iwai2018-08-19 18:36:50 +0200
commitd15ec0b482ff502e4e19e43d15aa5072e4290199 (patch)
treefbde3b834ca7300329cd1dce48d7d88d82cdbe36 /sound/ac97
parentALSA: ac97: fix device initialization in the compat layer (diff)
downloadkernel-qcow2-linux-d15ec0b482ff502e4e19e43d15aa5072e4290199.tar.gz
kernel-qcow2-linux-d15ec0b482ff502e4e19e43d15aa5072e4290199.tar.xz
kernel-qcow2-linux-d15ec0b482ff502e4e19e43d15aa5072e4290199.zip
ALSA: ac97: fix check of pm_runtime_get_sync failure
pm_runtime_get_sync returns negative on failure. Fixes: 74426fbff66e ("ALSA: ac97: add an ac97 bus") Signed-off-by: Lihua Yao <ylhuajnu@163.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/ac97')
-rw-r--r--sound/ac97/bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c
index 7a0dfca03a57..640812cb2152 100644
--- a/sound/ac97/bus.c
+++ b/sound/ac97/bus.c
@@ -529,7 +529,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);