diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-07-26 09:26:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-12 14:22:10 +0300 |
commit | b7532db2d458ee15f1f2b8953a7ae8cb51a3a78c (patch) | |
tree | 0fbb3672bad5dd60f7c5da184ba89edaceb24182 | |
parent | 80b7aa2651bcbfb7321f3db0cbe93dbda06e544c (diff) | |
download | linux-b7532db2d458ee15f1f2b8953a7ae8cb51a3a78c.tar.xz |
ALSA: usb-audio: Fix superfluous autosuspend recovery
commit 66291b6adb66dd3bc96b0f594d88c2ff1300d95f 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: 9799110825db ("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>
-rw-r--r-- | sound/usb/card.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 258b81b39917..45fc217e4e97 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -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--; |