From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-dm3nam03on0125.outbound.protection.outlook.com ([104.47.41.125]:63162 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730305AbeIBRc0 (ORCPT ); Sun, 2 Sep 2018 13:32:26 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Nicholas Mc Guire , Paul Burton , Ralf Baechle , James Hogan , "linux-mips@linux-mips.org" , Sasha Levin Subject: [PATCH AUTOSEL 4.4 27/47] MIPS: Octeon: add missing of_node_put() Date: Sun, 2 Sep 2018 13:16:12 +0000 Message-ID: <20180902131533.184092-27-alexander.levin@microsoft.com> References: <20180902131533.184092-1-alexander.levin@microsoft.com> In-Reply-To: <20180902131533.184092-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Nicholas Mc Guire [ Upstream commit b1259519e618d479ede8a0db5474b3aff99f5056 ] The call to of_find_node_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented here after the last usage. Signed-off-by: Nicholas Mc Guire Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/19558/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sasha Levin --- arch/mips/cavium-octeon/octeon-platform.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-o= cteon/octeon-platform.c index d113c8ded6e2..6df3a4ea77fc 100644 --- a/arch/mips/cavium-octeon/octeon-platform.c +++ b/arch/mips/cavium-octeon/octeon-platform.c @@ -349,6 +349,7 @@ static int __init octeon_ehci_device_init(void) return 0; =20 pd =3D of_find_device_by_node(ehci_node); + of_node_put(ehci_node); if (!pd) return 0; =20 @@ -411,6 +412,7 @@ static int __init octeon_ohci_device_init(void) return 0; =20 pd =3D of_find_device_by_node(ohci_node); + of_node_put(ohci_node); if (!pd) return 0; =20 --=20 2.17.1