From patchwork Wed Aug 16 06:35:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 714067 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C68ECC001E0 for ; Wed, 16 Aug 2023 06:37:04 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 12E037F1; Wed, 16 Aug 2023 08:36:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 12E037F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692167822; bh=B1XhsXeOf1KLuzzoE7Hj+Wd1xXbt2MCXFeUH7y8hK7s=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=JxLluGUYK1u9Gm0noltrTBLaitckXLHphypwpHDJvUOAT9qe5+S6d4a++fxIBdHfj ywyvi9sXyUCciiWT7LaikqYf1HZist/AcKLoXVeMTLXTTZv5B3mjjtlRFm0svoIR+v 1TtMnYcGN5AA4BqNWXli64FDS8CS7bPFsJbfao9o= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 027C9F80272; Wed, 16 Aug 2023 08:35:42 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6D26DF80074; Wed, 16 Aug 2023 08:35:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5929BF8016D; Wed, 16 Aug 2023 08:35:37 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0D1B8F80074 for ; Wed, 16 Aug 2023 08:35:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0D1B8F80074 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=CPY88hhh; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=wMrxSW41 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3C1762195A; Wed, 16 Aug 2023 06:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1692167730; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=CZw//hx3nZChmTaRkEMviDhO/KS2uaA7nPuJ0Ct7itc=; b=CPY88hhheJJvb5tlK2nWWysxdPqwjJmrBsIFklg9FGXPv7LvwbuhP+1yjcWYJPRPvZyYgK yxyb+zKVgnPxWkoIamPWrcg1eBrFE8DhTeX8Tuf9I53HHpzkNGNvB5daeL0mIJdZKJlGdX tBc28x9C5noNWGWEH4phXkvrSZkDWfk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1692167730; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=CZw//hx3nZChmTaRkEMviDhO/KS2uaA7nPuJ0Ct7itc=; b=wMrxSW41HZGnZoUgvVTGnUOFtO6Y33KfJiDl1pqDkexEur2xWKODUBOo6w1sMaQ3CA8n1V 7okHtFkm+YLV5VDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1A59C133F2; Wed, 16 Aug 2023 06:35:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4y6IBTJu3GQ8dQAAMHmgww (envelope-from ); Wed, 16 Aug 2023 06:35:30 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Cc: Stefan Binding Subject: [PATCH] ALSA: hda: cs35l41: Fix the loop check in cs35l41_add_dsd_properties Date: Wed, 16 Aug 2023 08:35:25 +0200 Message-Id: <20230816063525.23009-1-tiwai@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Message-ID-Hash: 6RCUULH3A5KD27KOY3FOG2HOBVP4G2UK X-Message-ID-Hash: 6RCUULH3A5KD27KOY3FOG2HOBVP4G2UK X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: model->hid is a pointer, and should be rather NULL-checked in the loop of cs35l41_prop_model_table. Fixes: ef4ba63f12b0 ("ALSA: hda: cs35l41: Support systems with missing _DSD properties") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202308160506.8lCEeFDG-lkp@intel.com/ Signed-off-by: Takashi Iwai --- sound/pci/hda/cs35l41_hda_property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c index 673f23257a09..48dcc3f1ef88 100644 --- a/sound/pci/hda/cs35l41_hda_property.c +++ b/sound/pci/hda/cs35l41_hda_property.c @@ -61,7 +61,7 @@ int cs35l41_add_dsd_properties(struct cs35l41_hda *cs35l41, struct device *physd { const struct cs35l41_prop_model *model; - for (model = cs35l41_prop_model_table; model->hid > 0; model++) { + for (model = cs35l41_prop_model_table; model->hid; model++) { if (!strcmp(model->hid, hid) && (!model->ssid || (cs35l41->acpi_subsystem_id &&