Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3635006pxb; Mon, 24 Jan 2022 14:03:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhRTqy3SAcqObtdwJIMzl+7PWFUb/Qs35q2QrYLAyZn2I/3O7GIdjc+JlkrobPXIzn+obd X-Received: by 2002:a17:903:124d:b0:149:8141:88ea with SMTP id u13-20020a170903124d00b00149814188eamr15673021plh.82.1643061828068; Mon, 24 Jan 2022 14:03:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061828; cv=none; d=google.com; s=arc-20160816; b=w0/gewR3yhLkzK/MK/uG91NKmU/GjcV9fhjpybuFgHG/BFngY9HD9hG17N50mVVwoZ Y47KJ/qmTZF0imVNrI9BiS4mQPfMZng3Ek/phKzj8GW2WIr9447edaewipWFjrzLM8Ws LTARAUWotc2saUpGDQBsCtAQZ/Nxn/rrcrqaYI+zOs9ZqgFRTEDEMV+q8Q59Ws2CUb3l HVpb/8WU/I+Esa+0ks5SdZgr5HprJKRa01Qxr7tLRjt0JIoI7IRK7OkhG5CWvFegLqvd wdpU1hJGTY/hQFRc8LqsF4ffBwbYrccggLkwKoP/25iSdb/Y1WoHIciAip6oPL6Hs9gt UAVg== 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=I1EuY1qIjmU4DH9d6sr6106AEcr5wLDVZHF3V8qMRc0=; b=HoC2w0UuM672KyS1DQpeaIHR2FpRLHU13OAIBAKT4668grxQscF9uXPMuuG88yePpx df/+mmehowYIyn0HSyB3u3m6Ll+E8CYgXRcNwOa/BxU/eWZLdGT19DE7uJiUCnS3PWfr ELsAGg2LnqrXD6NFkLLUGVoN42OVT3ionsZTCkqfksY7fowDNuzAJD9vI1mZPH89SYWL IcU+p2TyHNaEyaPMPruZqwBW6BReqBGZRm3r/fOuIfqd9ZOpgHEaO92BJRgJBr7gdbnN KVivrUDhiOGm9oIc8hYpYGKIAWARqt+3A3yW9UVk2JAbFmfgC5h1tK1XUehOl2OQwhrI FO2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QW1X4c01; 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 bk9si8099270pgb.669.2022.01.24.14.03.35; Mon, 24 Jan 2022 14:03:48 -0800 (PST) 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=QW1X4c01; 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 S1575019AbiAXVuy (ORCPT + 99 others); Mon, 24 Jan 2022 16:50:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1449145AbiAXVO6 (ORCPT ); Mon, 24 Jan 2022 16:14:58 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B691C06E027; Mon, 24 Jan 2022 12:11:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0B47B6091A; Mon, 24 Jan 2022 20:11:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5AA6C340E5; Mon, 24 Jan 2022 20:11:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055098; bh=MXPVVBYHEXHFo4yE+Xal95RCl5qOtXe7FpJ1wCoXn6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QW1X4c01vcnN+kOknMDZ2ROHTZAnJgESMi8jNjU2hd5hxKys4B8+i2SA/B8vg8PjO BxMGMJZbxsAysWW0iErg3EpL6J+2OXVji1LUfL/h1PQ36JkCh1XIQ7UPtlMg+Kg7hQ ipPtNu+5RXPeo7xJmm6NyeGLt0qPVTjfU/X8dXCE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.15 008/846] ALSA: core: Fix SSID quirk lookup for subvendor=0 Date: Mon, 24 Jan 2022 19:32:05 +0100 Message-Id: <20220124184101.185913749@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 5576c4f24c56722a2d9fb9c447d896e5b312078b upstream. Some weird devices set the codec SSID vendor ID 0, and snd_pci_quirk_lookup_id() loop aborts at the point although it should still try matching with the SSID device ID. This resulted in a missing quirk for some old Macs. Fix the loop termination condition to check both subvendor and subdevice. Fixes: 73355ddd8775 ("ALSA: hda: Code refactoring snd_hda_pick_fixup()") Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215495 Link: https://lore.kernel.org/r/20220116082838.19382-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/core/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/core/misc.c +++ b/sound/core/misc.c @@ -112,7 +112,7 @@ snd_pci_quirk_lookup_id(u16 vendor, u16 { const struct snd_pci_quirk *q; - for (q = list; q->subvendor; q++) { + for (q = list; q->subvendor || q->subdevice; q++) { if (q->subvendor != vendor) continue; if (!q->subdevice ||