]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ALSA: usb-audio: Fix superfluous autosuspend recovery
authorTakashi Iwai <tiwai@suse.de>
Mon, 26 Jul 2021 06:26:56 +0000 (08:26 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 26 Jul 2021 16:49:50 +0000 (18:49 +0200)
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>
sound/usb/card.c

index 2f6a62416c057466f1c8af82d7621a8e8822714b..a1f8c3a026f57901f4372181a85a1dabbdf6d641 100644 (file)
@@ -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--;