[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20170210194505.8236-1-christophe.jaillet@wanadoo.fr>
Date: Fri, 10 Feb 2017 20:45:05 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: benh@...nel.crashing.org, paulus@...ba.org, mpe@...erman.id.au,
jallen@...ux.vnet.ibm.com, nfont@...ux.vnet.ibm.com
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH v2] powerpc/pseries: Fix missing of_node_put
If 'dlpar_configure_connector()' fails, 'parent_dn' should be released.
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
v2: Reorder code in order to simplify the proposed patch
---
arch/powerpc/platforms/pseries/mobility.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index 5a0c7ba429ce..2f8be51f5fd0 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -226,6 +226,7 @@ static int add_dt_node(__be32 parent_phandle, __be32 drc_index)
return -ENOENT;
dn = dlpar_configure_connector(drc_index, parent_dn);
+ of_node_put(parent_dn);
if (!dn)
return -ENOENT;
@@ -233,7 +234,6 @@ static int add_dt_node(__be32 parent_phandle, __be32 drc_index)
if (rc)
dlpar_free_cc_nodes(dn);
- of_node_put(parent_dn);
return rc;
}
--
2.9.3
Powered by blists - more mailing lists