Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp483211pxt; Fri, 6 Aug 2021 06:45:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+rwISLy6amvFaTa9/RCkrPbiE6m6h8CNN26mVf/CaeOYcH467GGbXRfEA4gsmfHGvbWNY X-Received: by 2002:a02:c6c3:: with SMTP id r3mr10099476jan.7.1628257539681; Fri, 06 Aug 2021 06:45:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628257539; cv=none; d=google.com; s=arc-20160816; b=zu4FlPFaVVO+AZt6LNM48uZ7v/P613X7QUDCoCnA4oPBESQDleYWC59geuTI36xcHv hwziYchrOMeyb7KdlMc4AyqZ5M2N9zxWQqTgDX8BiFNkWEFOQSwzo62i/JATjcPGzurn o4H1ZWlzL/g0MHk9yr8QVYAB2jfbLlGarsRl9B1LP/QwEZmwqNyTS7WRdmsAbcBWGwJ4 rnXm+Roy321f8uOm4YgL0k9JGHvpCHc42juzzQnkrECouhVYViy26vqLQpi22iO8S60r ncJfnp5GkclYJ7fnf+33KbjlrRDw0bPUg6IG8qJtvCfEmLno2/L/yLOORI3tdmL0ZPCA 0OsA== 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=BlJWewkMK2yfM997VxGKkdCA3OYaMztEXuNbi2gYo5s=; b=jFpFS3iP9u9Xw60wlxLOyYkmlvlY6YGGF2CRb1UIiNLfHjgWXDx22w3AOBhPZJdxGs IltuT8Hn48nFROtzuJI95JlK727cLWg9CFGfCvk8LCVSQMvqKbmTAF5KbcHwail1Vfd+ PPJw0XyFVxMvqrBZ2MsK+BDsTXScchl9WPSH1Oywiacmgjo9Jxbh15DBd5n9pCNRcp4a 9saYjgFIRRBGODDRaqwmyRE6kMTrN1ewUqW+m9zEkQXCrJHHchH2ajVK/p/FZ+y0Tp/9 Ml0hvk2rI/t0nh62XIbdj4aYoApLCTADQOQwd/J+Lwk0dyiWKkdM/yuZEK/F9Kn0HRVc jHUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=npQYikMA; 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 z9si9716127ilu.28.2021.08.06.06.45.26; Fri, 06 Aug 2021 06:45:39 -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=npQYikMA; 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 S231163AbhHFIVV (ORCPT + 99 others); Fri, 6 Aug 2021 04:21:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:48492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243804AbhHFITD (ORCPT ); Fri, 6 Aug 2021 04:19:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ECE4A61163; Fri, 6 Aug 2021 08:18:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628237924; bh=u1luN1sMFI7o5STBnQbpqlrcozJB2enfmjp0qualJQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=npQYikMANYVeE4fthdJRtsYB9EdhOIYGyyYng7DYElbV1FrjT4/RMe7Tpx40baCMY ks3ODsY4i1s8kH1zXitGf6me4YCqicvV2gKTCQI3HGDSV8AtFh0wKyEBqDcsUAXbsx /eRPuEt5NmqreQFbQWRXO8WKTkhz319bpgIHkVC8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Mark Brown , Sasha Levin Subject: [PATCH 5.10 14/30] ASoC: ti: j721e-evm: Check for not initialized parent_clk_id Date: Fri, 6 Aug 2021 10:16:52 +0200 Message-Id: <20210806081113.620583972@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210806081113.126861800@linuxfoundation.org> References: <20210806081113.126861800@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: Peter Ujfalusi [ Upstream commit 82d28b67f780910f816fe1cfb0f676fc38c4cbb3 ] During probe the parent_clk_id is set to -1 which should not be used to array index within hsdiv_rates[]. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210717122820.1467-3-peter.ujfalusi@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/ti/j721e-evm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/ti/j721e-evm.c b/sound/soc/ti/j721e-evm.c index 017c4ad11ca6..265bbc5a2f96 100644 --- a/sound/soc/ti/j721e-evm.c +++ b/sound/soc/ti/j721e-evm.c @@ -197,7 +197,7 @@ static int j721e_configure_refclk(struct j721e_priv *priv, return ret; } - if (priv->hsdiv_rates[domain->parent_clk_id] != scki) { + if (domain->parent_clk_id == -1 || priv->hsdiv_rates[domain->parent_clk_id] != scki) { dev_dbg(priv->dev, "%s configuration for %u Hz: %s, %dxFS (SCKI: %u Hz)\n", audio_domain == J721E_AUDIO_DOMAIN_CPB ? "CPB" : "IVI", -- 2.30.2