Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3766059pxt; Tue, 10 Aug 2021 10:49:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhvhL3IUAuCIYxYIwxSabeFnUJ+LhvnikRTDz38C4NidgVFuBZTLbruu1hrVtkUp6LdzFA X-Received: by 2002:a6b:7e01:: with SMTP id i1mr1594582iom.13.1628617742290; Tue, 10 Aug 2021 10:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617742; cv=none; d=google.com; s=arc-20160816; b=pUODhMsvTASOoLYeBCu8V+liKVG8899eAKOx0IK3mHP7dr1iTzd8gWqgXiqdN2qrz4 jF2QLjMoBY46VlYSeXKWBVBgP0JrcY6h0wIpRTsgThS/YFFStIn4bH+6llu5+3TtdGNG DRdsnufCeScnMIJrTIzo2c/LCdMumF5dxft+ITBllpGCV2/5vtgNKBCgdSvY4ynqCZkw zcQfm55DRTtVvpm8toBLmQpJralIYNG3wDCRlbsXeAMcdSd19aUtnVW/Rlhk461evzDb gZfk0Yj1RizHg6zuRe6QhLk3Tpr4H7P69W3psfhOtCZmCY05nPD8fhlZFFbRef3wszC4 k9bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1mBpTB/7Q9WUbZ+eiNprdTx+t+fGiLswA+EgkBSObaU=; b=qOx0shAvJBT/CAUeHCr6OEw1adjKlWEC1He3tLlrCj7Xgcx1dFPmRx24WdpNnmrTbl F8M7Veu3fnJZm6/XkdpCi/rGll1I5hVdspWoZ2AvcaPTM9KUYvNiirj/hWoL0qjxMZ3Y cDslGqzd8l7r6LHIRGdAXMXpIKQxblof5zv2VorZSL7x3H12vxhz3XNINUte+HOsOHq7 xeHFPFU7Q8w1nZHlZpU815soFs5GYkYK8kWDc/d7AGKmU1esfEHr3L6T0qqn4Kdj8roG ikkrwcT/ViP48ukjz9x7OlAnDyxcEbOyxsydPgBdqwfpkNQubjQ8g2GVkaZ4Ca7sSrFQ tNZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SHiGav7+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u12si482307ill.124.2021.08.10.10.48.50; Tue, 10 Aug 2021 10:49:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SHiGav7+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234306AbhHJRrS (ORCPT + 99 others); Tue, 10 Aug 2021 13:47:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:57682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233895AbhHJRnD (ORCPT ); Tue, 10 Aug 2021 13:43:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2C30260F11; Tue, 10 Aug 2021 17:38:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617139; bh=shCdDjnZtYtla1OUNgFX+5xVre4DZppOtg+ux1VdUAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SHiGav7+enZaXXkOcl7pcM2xKMI1CVBJOawG6Vfe+y9HjjBuRgVWmgnSkJNDlGORb UMtX+3nOW/JtlsYasZZCxpsDE0svcB3F6AZeT/yKlULY1f2JjuywLUA3aV/NzDqURp qvrirTZ71XD8gv5zO6Jyi92+cwS6w5g73ux5vLy4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.10 062/135] ALSA: usb-audio: Fix superfluous autosuspend recovery Date: Tue, 10 Aug 2021 19:29:56 +0200 Message-Id: <20210810172957.798353741@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai 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: Link: https://lore.kernel.org/r/s5hr1flh9ov.wl-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/usb/card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -907,7 +907,7 @@ static void usb_audio_disconnect(struct } } - 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--;