Skip to content

Commit

Permalink
ALSA: ac97: fix check of pm_runtime_get_sync failure
Browse files Browse the repository at this point in the history
pm_runtime_get_sync returns negative on failure.

Fixes: 74426fb ("ALSA: ac97: add an ac97 bus")
Signed-off-by: Lihua Yao <[email protected]>
Acked-by: Robert Jarzmik <[email protected]>
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Lihua Yao authored and tiwai committed Aug 19, 2018
1 parent c7b8170 commit d15ec0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/ac97/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d15ec0b

Please sign in to comment.