Skip to content

Commit

Permalink
ALSA: usb-audio: Fix superfluous autosuspend recovery
Browse files Browse the repository at this point in the history
commit 66291b6 upstream.

The change to restore the autosuspend from the disabled state uses a
wrong check: namely, it should have been the exact comparison of the
quirk_type instead of the bitwise and (&).  Otherwise it matches
wrongly with the other quirk types.

Although re-enabling the autosuspend for the already enabled device
shouldn't matter much, it's better to fix the unbalanced call.

Fixes: 9799110 ("ALSA: usb-audio: Disable USB autosuspend properly in setup_disable_autosuspend()")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/s5hr1flh9ov.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
tiwai authored and gregkh committed Aug 12, 2021
1 parent 6537805 commit 8691bda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/card.c
Expand Up @@ -907,7 +907,7 @@ static void usb_audio_disconnect(struct usb_interface *intf)
}
}

if (chip->quirk_type & QUIRK_SETUP_DISABLE_AUTOSUSPEND)
if (chip->quirk_type == QUIRK_SETUP_DISABLE_AUTOSUSPEND)
usb_enable_autosuspend(interface_to_usbdev(intf));

chip->num_interfaces--;
Expand Down

0 comments on commit 8691bda

Please sign in to comment.