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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2CEB1C433F5 for ; Tue, 8 Mar 2022 02:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QgsE6diC/UYKy9vPRXuJl1N2NQt3fGFPYDMOtqx1UPo=; b=S5C72LzgwANQ6U osTtuljheos3eXfybTODCRBF2+MHYeoj3bCWMffc+NQhpMhQmA2IuwEoHd8VfC8Un0nIl9+Gn8NG/ p/Q1fqsBJLS3OLzTuwrn0Y+sQ8Wf+3VOw7/0Y79Ku/lUKeOjKZEvKGbFiZUvXVCfPumoAjo5pU+YU HXqndcQernYuILaFBSJ4Zzf0jekTk0ifj174ysPxfEOc4Nu2TvxdXtUp91Iorw9N5+oSRwGyt7czg dCpweFE7NhP8FHtW16I75paabWBCEGWAzQQsA0A3C8p6Mj4UQ+ADAjJ8dkn/rc65nHb19EFyThMJX GgZXT+6FlLtfR6CGsxmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRPFy-002QL5-BV; Tue, 08 Mar 2022 02:07:22 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRPFu-002QKK-90; Tue, 08 Mar 2022 02:07:19 +0000 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 C75A7614DB; Tue, 8 Mar 2022 02:07:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AC39C340F3; Tue, 8 Mar 2022 02:07:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646705237; bh=FO6In/hNNc4+xoPxbiFoiYv5P+ui3FmIN6FYKohezhQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uWEhtOmJW/pKK74Snzk7xTRhXgv+PfECzwVqS27gC2uv+FBBOo2AXWAgabYKNVt+d BIpJ7iZ3Po4HwcDzJ2hpIyY9slGkOFUek3mSOweWaJP0o/zgPHniPfXS6Xyl3xMy1W /Rz66R1l94kASKpyuLrtXi4v3LP3KIXK83RPsRNHnYK8H37abZa9gw0YDgOf+fJ5mT 6wlZKEO4BNF+nJDa24rlmgPk8Ol+VRhvkNLmeyoJZTOsORSomSuhi/Zxur3dS3afTk gHtmjt9unkJHUiRS3XFhwxJiPq9vqDYTFwB5u5Orq1KvIua33EI8lHPbz9O6CKRza3 0tw+AZSYQ7mmg== Date: Tue, 8 Mar 2022 10:07:12 +0800 From: Tzung-Bi Shih To: Miaoqian Lin Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , Jiaxin Yu , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: mediatek: mt8192-mt6359: Fix error handling in mt8192_mt6359_dev_probe Message-ID: References: <20220308015224.23585-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220308015224.23585-1-linmq006@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220307_180718_383645_4C583E8D X-CRM114-Status: GOOD ( 12.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 08, 2022 at 01:52:22AM +0000, Miaoqian Lin wrote: > The device_node pointer is returned by of_parse_phandle() with refcount > incremented. We should use of_node_put() on it when done. > > This function only calls of_node_put() in the regular path. > And it will cause refcount leak in error paths. > Fix this by calling of_node_put() in error handling too. > > Fixes: 4e28491a7a19 ("ASoC: mediatek: mt8192-mt6359: fix device_node leak") > Signed-off-by: Miaoqian Lin Reviewed-by: Tzung-Bi Shih _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel