Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp497988pxt; Fri, 6 Aug 2021 07:06:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSpTkiHa50rGxxdbmLGFrS8SgvmgSuZEK0BlszwXUPLdOkJ1zBBKYt+QJ/+DdFNFvwlWel X-Received: by 2002:a05:6e02:10a:: with SMTP id t10mr1009846ilm.52.1628258800653; Fri, 06 Aug 2021 07:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628258800; cv=none; d=google.com; s=arc-20160816; b=HUF2EiM60++RRKV8Xt+8Geww+VAldJfHJodolC9mg2agtfwy4dFf0vIWWscnG0jILx xQRA2IPCzHYkfbpItZr3VsLBUJk0X1u6/E14BWHYmDi0sKQOubUNXhBnkxMk/EjFjlI+ KO3erPyiKUhG6rSM8WJ9/oNsbwW1p3mhTosG5UQta/wFdwnNN6yW1292nqovHp1NEe9c T1hKWcHgfD/iiEu1OjbLquqjZPdxo+Wy+x5PoBdz0BoT+ILxdud58qjCQA61CFOFvwoE 7/3X3NT6HKBPZtSWchnHxh5oHQvw6I9bEVr0MhfxfMNlcOVSSIW44qO2cDD1y5GHVd9M dpTg== 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=qAUyjz+1EVaI7zcIL6Hfoy41vhRycA82rsHa/TiHcsxzwl7sza4htuFSNRfdUSeOhQ pAP5E8IWzFW16C1uspJ7WV7x4RUGbiuUNRWBnQxozy5Cx5TrI1xJ8Q8MtthKrCLSuo7w xsiHm2D6QTn2RlNSyEBlX7v63LtMO5JwUc+POI97DPOhj1+Grf0Xlw0AUKHryZRa1Jkg yvngnA985BWRMl762XZFu3UVYPZpjAZS37I2cWUfFyEOk2z8HYpCsrA26Ilu2SvSIALE WU4BqRnvwONRzLdY9UinUDtbjhjxM0urK3aDb0qs+71Sb26aczO7ljnr24qz2IC8QP9l awqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Tpk1460r; 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 v18si8938091ilo.15.2021.08.06.07.06.26; Fri, 06 Aug 2021 07:06:40 -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=Tpk1460r; 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 S244881AbhHFIYX (ORCPT + 99 others); Fri, 6 Aug 2021 04:24:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:51188 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243806AbhHFIUz (ORCPT ); Fri, 6 Aug 2021 04:20:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D0E861209; Fri, 6 Aug 2021 08:20:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628238031; bh=u1luN1sMFI7o5STBnQbpqlrcozJB2enfmjp0qualJQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tpk1460rh/5pqCobcrTFfaVTLvGNBa+KmM9NQG+W9nN5/AZSRcCYjWSYCfKVtm33l iDWQFYWwji8IiCND9CJMSC04MuI4hUXZxznHXpRfG9QdAfGnPLcWeZAgBwMOtgcUZf LvqNuZvQOusHdDXtwFIw2aqA2mVjsLYl3D8iM8/U= 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.13 25/35] ASoC: ti: j721e-evm: Check for not initialized parent_clk_id Date: Fri, 6 Aug 2021 10:17:08 +0200 Message-Id: <20210806081114.554978326@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210806081113.718626745@linuxfoundation.org> References: <20210806081113.718626745@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