Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2453313ybi; Sun, 9 Jun 2019 12:10:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxy3NdjLe2zN/Le1FilAM8KoDp649tHpRlslXCApz1SzfMxPe3lF/qeSqYwsw9PY+KOFRyW X-Received: by 2002:aa7:8219:: with SMTP id k25mr72639731pfi.38.1560107410302; Sun, 09 Jun 2019 12:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560107410; cv=none; d=google.com; s=arc-20160816; b=ltlnXX4PLLCSAUqQZ0ax1hueTnj9dK9zbcH9+rAueFUEX2Gd1RtUxumhmdl2KVd62Y wM1bmXJXzi0UxAw+fcm/F7d22uVpqQiNp17H8UGpNh6yl2w1MoJKckHEhvW6d12GcRdE MURK+48VwnN4GHX/l88pXQvjI3fImHlVpnFEQpa3asriwUF2w3lFfrqsZrm3WXtaV+7E vZOPMj4x4Tv6baGnl/3hCTArY9bOOYcf5wkL4GBfuBIqRuGa0WscQo8vDL8tHg2HB6sd izblI8FlBCa9+Pi/6+3jRtJBQd0Z08f391h3lyQhAD2pZy14ObmLfdAkpq7fRdusgZG2 ieDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=e1XlNGose6OvSzjoIOowrv0NTRT5QYNUC940nx2xHM4=; b=G+yAW+8vFxamX1VX49auwLByWR7ZyU/fMxhza/Uo2CryXYh7FBrVVTzztYpoziqOwR VCWsaltsBMXPC9EfaArqgsjwpYIT1dm4li1I+xeqS7AyhuOO76961/i3RsxN3bQ7MiEf eqFlRTbIs9a9F+fytn0zsaiZUjezj/T83XGEDM81pxnCBlahHtNdhwrQW0mR1VhWwYne 243mvQT9N1AQxd59oMk4cEgvNdt2OQXGlZiNgdF3EOSm2vS1RaUp0ouVMN2rsBTKasPe 6lqN5kNKLrKIY0p9UzrbC6rIzfYYIeVOsIr3W+Mnt2yWTGZbZCCKUfq127z+aV75lHul Rv/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KW7OcEmP; 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 y8si7461600plt.202.2019.06.09.12.09.54; Sun, 09 Jun 2019 12:10:10 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=KW7OcEmP; 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 S2389050AbfFIRKS (ORCPT + 99 others); Sun, 9 Jun 2019 13:10:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:41184 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388335AbfFIRC6 (ORCPT ); Sun, 9 Jun 2019 13:02:58 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1EDEA206C3; Sun, 9 Jun 2019 17:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560099777; bh=acZXoBPoKiXvlqIJzBAzO0pMqsa6VZtkUPUMJfKHWvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KW7OcEmPBNNvc4KMslz5eGNj1dok/gkUg8TN0r74gQisYnT2cXMcZzjpabP6HFjnG WEcohsED3LXzmYFK15tYoadibFQBwPUH23bH33g65EtfayxLoRv2ILNookhT2PSpE3 3kLrkrA1ibcmEfOM8fUJC080b/t7atwFttDcEJok= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wen Yang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, Sasha Levin Subject: [PATCH 4.4 162/241] ASoC: eukrea-tlv320: fix a leaked reference by adding missing of_node_put Date: Sun, 9 Jun 2019 18:41:44 +0200 Message-Id: <20190609164152.447744799@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190609164147.729157653@linuxfoundation.org> References: <20190609164147.729157653@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit b820d52e7eed7b30b2dfef5f4213a2bc3cbea6f3 ] 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 Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 883087f2b092b..38132143b7d5e 100644 --- a/sound/soc/fsl/eukrea-tlv320.c +++ b/sound/soc/fsl/eukrea-tlv320.c @@ -119,13 +119,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.20.1