From patchwork Sat Jul 17 12:28:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?P=C3=A9ter_Ujfalusi?= X-Patchwork-Id: 12383585 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E91CC636CA for ; Sat, 17 Jul 2021 12:28:20 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 206FA611C1 for ; Sat, 17 Jul 2021 12:28:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 206FA611C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id AD52D166B; Sat, 17 Jul 2021 14:27:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AD52D166B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1626524898; bh=uzTlJXmnHGJ7XvcJ/3YpYVrDyPbjbf0gvf18kk265fE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GUaaJ6CDcCkzc7NnlFTZjArL+pRyYMD3FzK+CwYsn3MTilc5fgSXYt4mMQyK/i67/ A7jz3nbvObbbdh1HJEbKn9lYbAjhloj4E1KkaueiYab/yfOH88Swl8sIcWsxuv52ND A9tWQdSRkV62Z23uRUTHQ4/zXhveepN0vv76J1Rs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2BF91F804E1; Sat, 17 Jul 2021 14:26:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1CF23F80424; Sat, 17 Jul 2021 14:26:01 +0200 (CEST) Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F05D3F80217 for ; Sat, 17 Jul 2021 14:25:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F05D3F80217 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HagJseli" Received: by mail-lf1-x134.google.com with SMTP id u13so20611746lfs.11 for ; Sat, 17 Jul 2021 05:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QQNp0sdJ1Pncpy92tkHPev6Ip/OvjtBZgI6rNz1+HnQ=; b=HagJselij1rPkM83SkXRi8s5txDFX3iZo24S2R4hEnOrrQGOmjxpOj2f/Ubp/KwrMh eQQAVkAa/d/2qiApChdMTlifgVc8mTYbdd9F+xycTz58txExhdewxGYv3mJQ2zrEo4Pl 1bUymxNUNiHCh2BrSinuc0T0AQNYlUXfbNvY61COhHCAT08NKdzjOdgy8ijKnpu8PSDK +g7qOiWP6f1y5DO6oQH9RDyslvKU8Rr6+ioNcNXo3UTqUzlMjKiosJv0e9cNCKHsYDeL Y/fLf9o+TD+7Cctgdwgj9vwIEkTuFLWtnyBMGTRNYRSz4T9X2i0Ue2VJb4JoqJpZ+oCy sWkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QQNp0sdJ1Pncpy92tkHPev6Ip/OvjtBZgI6rNz1+HnQ=; b=NZY45K5ZrziGnWcIU0ojgnffzf2W/8JkCfKOmVhZWm3aiyTTcFFiQxi94QLQOZIebB luV/7JhqVAVm04ZwkKO9BjJJv21leH/z9coueCHLMgn0ZoJfS8IOTYMzKwYoQTtbbrrD EUP8hEjeutVpnDQbxbs+Aew+AkE33mrTHLXmHBfVmrraYl+GtYqZeH/7c6vg3hhq8XKg 8O3em7Wv/9aSd7o0rSqWRCyVOEV5I5rR5NAP3nbHcg7yncT6gD/c5DUExBm5xrLjW/Nd yYZQHyttcVXz0QG3QyxfbcLMqVDrzgdR4pdCyoCufyd2dpwPGkcPWGyZy6XKwHr8tuCo Kvzw== X-Gm-Message-State: AOAM532CXuaQpTpZuwzO3ww2E3OYSxrjuxCcU2yCW9yCibyd8q+NruFT 74QII5rxpjei7R0B0M2sTp4= X-Google-Smtp-Source: ABdhPJwvjZYy4JK+uyCUeuLazErVsTkw42oyvSUNnwSGJ2+I4tunXj0aL2huEmXDf7NnkY+/GDNpXg== X-Received: by 2002:ac2:5d2e:: with SMTP id i14mr11130476lfb.642.1626524754566; Sat, 17 Jul 2021 05:25:54 -0700 (PDT) Received: from localhost.localdomain (91-155-111-71.elisa-laajakaista.fi. [91.155.111.71]) by smtp.gmail.com with ESMTPSA id v4sm860087lfi.118.2021.07.17.05.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jul 2021 05:25:54 -0700 (PDT) From: Peter Ujfalusi To: broonie@kernel.org Subject: [PATCH 2/3] ASoC: ti: j721e-evm: Check for not initialized parent_clk_id Date: Sat, 17 Jul 2021 15:28:19 +0300 Message-Id: <20210717122820.1467-3-peter.ujfalusi@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210717122820.1467-1-peter.ujfalusi@gmail.com> References: <20210717122820.1467-1-peter.ujfalusi@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 --- 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",