ALSA: ac97: fix check of pm_runtime_get_sync failure
commit d15ec0b482ff502e4e19e43d15aa5072e4290199 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
52977303d9
commit
d7cff00160
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user