Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3115176rwb; Mon, 15 Aug 2022 18:29:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR73paUB+a/Svs0dLTbGJF89Gm7SEX0lwswUVZRBWAD+kwgquzTRqPquod9lFO5OEvT4q9v7 X-Received: by 2002:a05:6a00:17a8:b0:52e:6e3e:9ff with SMTP id s40-20020a056a0017a800b0052e6e3e09ffmr19048345pfg.42.1660613347790; Mon, 15 Aug 2022 18:29:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660613347; cv=none; d=google.com; s=arc-20160816; b=I8fwZz5N4EQB8kDnj0XDIjYLNfjf4tEx0bteyJQtByWZJ7JDGCoBdvfLo829j6CZFb GBDW3zFDQMSunjCKSVrlJQHRCmZdF/o6cB7SdvrlQGzHJlA0tTIClJ5TjauyU4BI9P/I hA3UCASTILWQAbmhNNaHkSh9oKVzQWTmmwr/YFkjICDoesCLWYTvrm9SaZ8S9SD/uva1 7t1TWAT0YnvcoHdBuh9HVRM+NlyESHJWZCR+oBqDEA0YythYvvS3w+4a7ZURyFRUhYhl FYL1tj8uogk7Fq6dGWGz5SjhwnxbLBP5bvxPFqbdKdHN43q5rvGOI0q1BRb/WHtUTY/D DN9Q== 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=gTLM9kCCDF9VdFIUPs8DMSdI19eB61i1IyWMQsVALyM=; b=ZkDL8AU0DPvdJ0b0WGsysRicVrtS34aKINKom9Gkw0rvKiysNOjQyxCi6jFO7mPPtF yTeBeCoZnQPIQl8e+PqwmqicCWs6XIEtSZc2dBK9hVC5KVaqaShrkHQvbA30ipaT+d7k QPAwYeRi4x6eort+LDiEU8xB/k3Zg8X95D3dmjE04cHzBwQxH110IMw4C3z8iKYcPRyq iep/xs+QRaCAMc+g7cwz9vESF8323vLVB4VfQ6OQCz1j7HTWepgS3eyeQBnnJoGjuCdt PUHFrL3L6o4KppbU5sgmpqjhhFV3BR3akHMfWQyp2wyKqI3ly2xdbdTHy2jPlNwvhbs5 3tHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Gm+WxyFo; 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 g67-20020a636b46000000b0041cea4daf7dsi12012365pgc.774.2022.08.15.18.28.56; Mon, 15 Aug 2022 18:29:07 -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=Gm+WxyFo; 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 S240520AbiHPAxl (ORCPT + 99 others); Mon, 15 Aug 2022 20:53:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347593AbiHPAp7 (ORCPT ); Mon, 15 Aug 2022 20:45:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0926FADCC4; Mon, 15 Aug 2022 13:41:52 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 9C9DA611FA; Mon, 15 Aug 2022 20:41:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F481C433C1; Mon, 15 Aug 2022 20:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596111; bh=5UhoXcEIbPk8Dp4swVKTZKdyP4ZLu19tMH5KXU4pwBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gm+WxyFou2i7m7pxvfJtQzmu9gv/6wTyRk/CUUMAEPbQmKSNWr8aW6KqpXHNlBBsG V3O3IGJQf0ETxDZ8SV4LBmhG0Krdb91BOw33CZ7IZupbLXltgcoiF4S81VrBekYU4q LsREale882QC4Hqe3ZCG/3bHiMdeFsxyYFeT/oUY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kuninori Morimoto , Mark Brown , Sasha Levin Subject: [PATCH 5.19 0941/1157] ASoC: audio-graph-card2.c: use of_property_read_u32() for rate Date: Mon, 15 Aug 2022 20:04:57 +0200 Message-Id: <20220815180517.175223922@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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,T_SCC_BODY_TEXT_LINE 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: Kuninori Morimoto [ Upstream commit 817a62108dfacebd548e38451bf0e7eee023e97f ] Audio Graph Card2 is using of_get_property(), but it should use of_property_read_u32() to getting rate. Otherwise the setting will be strange value. This patch fixup it. Fixes: c3a15c92a67b701 ("ASoC: audio-graph-card2: add Codec2Codec support") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h741s961.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/generic/audio-graph-card2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index d34b29a49268..8e0628e6f2a0 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -856,7 +856,7 @@ int audio_graph2_link_c2c(struct asoc_simple_priv *priv, struct device_node *port0, *port1, *ports; struct device_node *codec0_port, *codec1_port; struct device_node *ep0, *ep1; - u32 val; + u32 val = 0; int ret = -EINVAL; /* @@ -880,7 +880,8 @@ int audio_graph2_link_c2c(struct asoc_simple_priv *priv, ports = of_get_parent(port0); port1 = of_get_next_child(ports, lnk); - if (!of_get_property(ports, "rate", &val)) { + of_property_read_u32(ports, "rate", &val); + if (!val) { struct device *dev = simple_priv_to_dev(priv); dev_err(dev, "Codec2Codec needs rate settings\n"); -- 2.35.1