ALSA: ac97: fix check of pm_runtime_get_sync failure

pm_runtime_get_sync returns negative on failure.

Fixes: 74426fbff6 ("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>
This commit is contained in:
Lihua Yao 2018-08-15 23:20:34 +08:00 committed by Takashi Iwai
parent c7b8170790
commit d15ec0b482
1 changed files with 1 additions and 1 deletions

View File

@ -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);