Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp324604img; Tue, 26 Feb 2019 00:18:44 -0800 (PST) X-Google-Smtp-Source: AHgI3IZTmMb+M7iwZ6kcH2FnoGVn6a4MgcRDjVJPJw/6PMoqb6QY5MAeBpRD23DFfdndoaheN09w X-Received: by 2002:a63:3446:: with SMTP id b67mr23248568pga.122.1551169124184; Tue, 26 Feb 2019 00:18:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551169124; cv=none; d=google.com; s=arc-20160816; b=mLuc1L3MUt0+lrWSZvCBTkgOqO4mgyD6YzUn8MEchnNvbtihC2GfrhmMiMxeSOyHis o6Uf9hfB3UecEyfQTFIjEXKCQmOg0v9zol2HzzBRw+TeY99kLtaNWlID7BTaDN+giO3q lZZs7vfaTFBUh2TJPglNjjW54barvnZDzdZ3NqXnMyjFwKagaMfxyiaWvALTGUimJdQY NA9lwZsb7FVXWFuA+tJvCwBVtvvXtd5mCvnFUKd/uv6vie6dBcwcYLDXKGGcHUxP3Ah0 /4Ovx4zUtVsmcphcBmnjSFZVSfpCQ6+DYXv6gWpoy81fb9Pa3cQQRtbEyNdSuoz5vJYP e2FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ea7ZqUGLzO2Z1P3xUcSxwZD3E7d2qHgPWpi6hCgGeU0=; b=w6g2eV0hnE57OvE9nGuQBSqLp3OIWMDnTNl+hBK4vGuAJ4CopAsRlmg9pC/N6qFGel WFLDlJKMW14ZZzJv8QxpM2LF7r0hEV3NW8ew0ZV/Ygo+Hgj7fn4TRRdqptjnHhwDjUoF ENzAT17prZrO4CpS86hMOSMoVNNOR5udSgX5qn1DH67bTGZZf0QMHoP/aUST/6Z/aFSc z3WL6R+SwqLOoe9oAtr95Mw3PgOJB8mBd/SyghbLYHUvpGzHwSlJtD/jK+Hzoj+VNmP6 rttb9PjgbpuGSSJ2zsVyXfEMCyLdmJBcnIsZc4LF50SbZrFwoyioEOalEiTFXJRhkTNN dQGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 130si12352103pfy.262.2019.02.26.00.18.29; Tue, 26 Feb 2019 00:18:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727193AbfBZISD (ORCPT + 99 others); Tue, 26 Feb 2019 03:18:03 -0500 Received: from mxhk.zte.com.cn ([63.217.80.70]:29944 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbfBZISC (ORCPT ); Tue, 26 Feb 2019 03:18:02 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id B8E379A6E35A0A4AF74A; Tue, 26 Feb 2019 16:17:59 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id x1Q8Hr7G018952; Tue, 26 Feb 2019 16:17:53 +0800 (GMT-8) (envelope-from wen.yang99@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2019022616180756-1860815 ; Tue, 26 Feb 2019 16:18:07 +0800 From: Wen Yang To: lgirdwood@gmail.com Cc: broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, linuxppc-dev@lists.ozlabs.org, wang.yi59@zte.com.cn, Wen Yang Subject: [PATCH 3/3] ASoC: eukrea-tlv320: fix a leaked reference by adding missing of_node_put Date: Tue, 26 Feb 2019 16:17:51 +0800 Message-Id: <1551169071-11639-3-git-send-email-wen.yang99@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1551169071-11639-1-git-send-email-wen.yang99@zte.com.cn> References: <1551169071-11639-1-git-send-email-wen.yang99@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2019-02-26 16:18:07, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-02-26 16:17:49, Serialize complete at 2019-02-26 16:17:49 X-MAIL: mse01.zte.com.cn x1Q8Hr7G018952 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/eukrea-tlv320.c:121:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 102, but without a correspo nding object release within this function. ./sound/soc/fsl/eukrea-tlv320.c:127:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 102, but without a correspo nding object release within this function. Signed-off-by: Wen Yang Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org --- sound/soc/fsl/eukrea-tlv320.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/eukrea-tlv320.c b/sound/soc/fsl/eukrea-tlv320.c index 191426a..30a3d68 100644 --- a/sound/soc/fsl/eukrea-tlv320.c +++ b/sound/soc/fsl/eukrea-tlv320.c @@ -118,13 +118,13 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) if (ret) { dev_err(&pdev->dev, "fsl,mux-int-port node missing or invalid.\n"); - return ret; + goto err; } ret = of_property_read_u32(np, "fsl,mux-ext-port", &ext_port); if (ret) { dev_err(&pdev->dev, "fsl,mux-ext-port node missing or invalid.\n"); - return ret; + goto err; } /* -- 2.9.5