Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4373699imw; Tue, 19 Jul 2022 05:34:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tdmJFsM8oTL38Ovs+TWyYtWVqdPCWd4HaBMwBm8S+TytwjSLIjFSb5aFb2GWyZDTT18DhD X-Received: by 2002:a05:6402:d0a:b0:437:66ca:c211 with SMTP id eb10-20020a0564020d0a00b0043766cac211mr43771253edb.29.1658234071525; Tue, 19 Jul 2022 05:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658234071; cv=none; d=google.com; s=arc-20160816; b=kdkzARvm/dx5aEVsU0alsNNvzPNNBMgHzWVR82TiwlZJPBWesbAeyN4Bya+K7n8cBy sSrZa1O/DA01Iepi87nuEEt4XadZ1OpID557m4Ep+e9a4y+IZ3oOXRxjhyQFig0Q9Izk lFtcahV1HgTXXi5u4RDLryZys0q1QZOdr/V+ImBwHy8qr9spoXwc6+eIYMlFTRKdywEg qD1axyd6XjThrR8FDu7UoRnMApJ/YWfbhi+KuommUv+G/MLIk+xdd4mL+QTt2lDzO58q TRYX5nU2/5f3BM+dIWQk1nSuh3SqIMp1lkPnJHhmdfMS+nN6eJ9L2Ztu67yIwuqeexpW WpHQ== 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=YC5fJI70jKt0LDYHd+v21JTYogVdYsEdhAzB+eUP1IQ=; b=Z/vjrvahD+HxLpbQUvxYGDMEYLFzv/R7xxJLEeXPiXgaqMSZtPun16qcHohol0sEhL eNFTZCTT7RGdBdS3wu+os9T1/zPRNOOalCrrC5S7q3Y9ExhODy5iA9+pH32uECbpDm4c mUosl9YfPlvB+RLiUKO+Fco6BKxfMa6xuV4ChJbVWvkV82ITq1Qrp7KMAn16p2SOIgmz NTsqruCXh2tINEb9ta2cYEuRk+D39LxIbTW/1JxIxga4wIXpyJZ1Ync82X1Gc9dK0lKw ESXUQnUOOu8BgdRURnth9vS1cSUfjUcBWoSw78aDiLTwPjsymkXG0j8ihBTXlk69rPgO 46JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nBHJJ+4V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l17-20020a170906795100b0072b4afe43desi19125592ejo.105.2022.07.19.05.34.05; Tue, 19 Jul 2022 05:34:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nBHJJ+4V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S237514AbiGSMUg (ORCPT + 99 others); Tue, 19 Jul 2022 08:20:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239415AbiGSMS0 (ORCPT ); Tue, 19 Jul 2022 08:18:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61D7F57239; Tue, 19 Jul 2022 05:06:43 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 91AD3B81B82; Tue, 19 Jul 2022 12:06:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F39E5C341C6; Tue, 19 Jul 2022 12:06:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232386; bh=XGiKy/R4KCoFi8zxtIeFEjyru5bsAbCtOkKNelcBf34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nBHJJ+4VsjCCHNVnqXzNSH1NuyS1bon6CZA3KNsvtdNZe/QBsewHpvoqUcKVAUa71 wbm/emz6uolhK3TObV/5rroSdCvfsxM2xzc7BtC17WlEbGBH9z3NKmog74ShohrkfU 91czaE70ZGhFO2oXON2vbF/tTKFzmeDwfrSK3tAo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Cezary Rojewski , Mark Brown , Sasha Levin Subject: [PATCH 5.10 039/112] ASoC: Intel: Skylake: Correct the ssp rate discovery in skl_get_ssp_clks() Date: Tue, 19 Jul 2022 13:53:32 +0200 Message-Id: <20220719114630.091756834@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114626.156073229@linuxfoundation.org> References: <20220719114626.156073229@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Ujfalusi [ Upstream commit 219af251bd1694bce1f627d238347d2eaf13de61 ] The present flag is only set once when one rate has been found to be saved. This will effectively going to ignore any rate discovered at later time and based on the code, this is not the intention. Fixes: bc2bd45b1f7f3 ("ASoC: Intel: Skylake: Parse nhlt and register clock device") Signed-off-by: Peter Ujfalusi Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220630065638.11183-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/skylake/skl-nhlt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c index 87c891c46291..c668e10baade 100644 --- a/sound/soc/intel/skylake/skl-nhlt.c +++ b/sound/soc/intel/skylake/skl-nhlt.c @@ -201,7 +201,6 @@ static void skl_get_ssp_clks(struct skl_dev *skl, struct skl_ssp_clk *ssp_clks, struct nhlt_fmt_cfg *fmt_cfg; struct wav_fmt_ext *wav_fmt; unsigned long rate; - bool present = false; int rate_index = 0; u16 channels, bps; u8 clk_src; @@ -215,6 +214,8 @@ static void skl_get_ssp_clks(struct skl_dev *skl, struct skl_ssp_clk *ssp_clks, return; for (i = 0; i < fmt->fmt_count; i++) { + bool present = false; + fmt_cfg = &fmt->fmt_config[i]; wav_fmt = &fmt_cfg->fmt_ext; -- 2.35.1