From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C0443C433F5 for ; Mon, 21 Mar 2022 04:00:58 +0000 (UTC) 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 985F01675; Mon, 21 Mar 2022 05:00:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 985F01675 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1647835256; bh=6C2Rn2TiO19qVcy2kVX3WO5CMQAaiGC6EBfvsJ7KrWI=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=oaIvqB8tXdDwsN1xsZEuTDe3TQAD8Gs+++1Bwdoc25dFnRzeNY1IThnTxl68PCDPU u7W9nozv64vr6BOYlzsrbiVTO7c0h6uz5mbXMOgwUHI4k7zABVHINT0Ioz9EhLvEaU ahCTAIawalp13HBjIisnJjvYgO1iApUGyNyLl4SU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C6A17F802D2; Mon, 21 Mar 2022 04:59:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 55267F80431; Mon, 21 Mar 2022 04:59:50 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DA035F80238 for ; Mon, 21 Mar 2022 04:59:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DA035F80238 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sNHA/biy" 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 3326A60C8B; Mon, 21 Mar 2022 03:59:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D741C340E8; Mon, 21 Mar 2022 03:59:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647835183; bh=6C2Rn2TiO19qVcy2kVX3WO5CMQAaiGC6EBfvsJ7KrWI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sNHA/biyCxRt6ihYlKG7yYtUAnAIa+4/rTM34JAZ2oVG1nMbaacKi1UA9fTlQpFiX HOakm6JDehmbET4ORvCXeWqk+LRKNUp2qdOTkiNxWShg8MmwTJo2I5KCC+8a5MGDCr nFFfpnBt60HU0/xklNUDWGFpY/+uXNOSMfrNLSHQSFlQa4rTwdaOjImDOjOsa6drMm 0YRlgrl0nGbcbNmf6XWoZMGtyWvNuO+ta1WYKbwIzzLs6wa1iBpUIPjQdMRhZoO0vg L7qoSX+Y3TlUZ2m0FgqNs90Xvh74ElQ2tvFccRo2N7af7vUHho2tYfHulF50oBgSQG 7DBUnpf1aBamQ== Date: Mon, 21 Mar 2022 11:59:38 +0800 From: Tzung-Bi Shih To: Jiaxin Yu Subject: Re: [v5 3/4] ASoC: mediatek: mt8192: refactor for I2S8/I2S9 DAI links of headset Message-ID: References: <20220319114111.11496-1-jiaxin.yu@mediatek.com> <20220319114111.11496-4-jiaxin.yu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220319114111.11496-4-jiaxin.yu@mediatek.com> Cc: devicetree@vger.kernel.org, linmq006@gmail.com, alsa-devel@alsa-project.org, robh+dt@kernel.org, linux-kernel@vger.kernel.org, Project_Global_Chrome_Upstream_Group@mediatek.com, broonie@kernel.org, linux-mediatek@lists.infradead.org, trevor.wu@mediatek.com, matthias.bgg@gmail.com, aaronyu@google.com, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.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" On Sat, Mar 19, 2022 at 07:41:10PM +0800, Jiaxin Yu wrote: > @@ -1145,6 +1140,13 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev) > goto err_speaker_codec; > } > > + headset_codec = of_get_child_by_name(pdev->dev.of_node, "mediatek,headset-codec"); > + if (!headset_codec) { > + ret = -EINVAL; > + dev_err_probe(&pdev->dev, ret, "Property 'headset_codec' missing or invalid\n"); > + goto err_headset_codec; > + } (to be neat) Does it have any reason to prevent from using of_parse_phandle() but of_get_child_by_name()?