Skip to content

Commit 9003ebb

Browse files
committed
ALSA: usb-audio: Fix runtime PM unbalance
The fix for deadlock in PM in commit [1ee23fe: ALSA: usb-audio: Fix deadlocks at resuming] introduced a new check of in_pm flag. However, the brainless patch author evaluated it in a wrong way (logical AND instead of logical OR), thus usb_autopm_get_interface() is wrongly called at probing, leading to unbalance of runtime PM refcount. This patch fixes it by correcting the logic. Reported-by: Hans Yang <[email protected]> Fixes: 1ee23fe ('ALSA: usb-audio: Fix deadlocks at resuming') Cc: <[email protected]> [v3.15+] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 7ccb0a9 commit 9003ebb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/usb/card.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ int snd_usb_autoresume(struct snd_usb_audio *chip)
638638
int err = -ENODEV;
639639

640640
down_read(&chip->shutdown_rwsem);
641-
if (chip->probing && chip->in_pm)
641+
if (chip->probing || chip->in_pm)
642642
err = 0;
643643
else if (!chip->shutdown)
644644
err = usb_autopm_get_interface(chip->pm_intf);

0 commit comments

Comments
 (0)