powerpc/44x/fsp2: add missing of_node_put
Subsystems (2)
PATCH 1/1 powerpc/44x/fsp2: add missing of_node_put
Early exits from for_each_compatible_node() should decrement the node reference counter. Reported by Coccinelle:
./arch/powerpc/platforms/44x/fsp2.c:206:1-25: WARNING: Function "for_each_compatible_node" should have of_node_put() before return around line 218.
--- arch/powerpc/platforms/44x/fsp2.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/platforms/44x/fsp2.c +2 -0
@@ -208,6 +208,7 @@ static void node_irq_request(const char *compat, irq_handler_t errirq_handler)if (irq ==NO_IRQ ) {pr_err ("device tree node %pOFn is missing a interrupt" , np); +of_node_put (np);return ; }
@@ -215,6 +216,7 @@ static void node_irq_request(const char *compat, irq_handler_t errirq_handler)if (rc) {pr_err ("fsp_of_probe: request_irq failed: np=%pOF rc=%d" , np, rc); +of_node_put (np);return ; } }
Signature · 1 line
1.8.3.1
Michael Ellerman
AppliedQuoted 8 lines · Bixuan Cui
Early exits from
for_each_compatible_node()should decrement the node reference counter. Reported by Coccinelle:./arch/powerpc/platforms/44x/fsp2.c:206:1-25: WARNING: Function "
for_each_compatible_node" should haveof_node_put()before return around line 218.[...]
Applied to powerpc/next.
[1/1] powerpc/44x/fsp2: add missing of_node_put
https://git.kernel.org/powerpc/c/290fe8aa69ef5c51c778c0bb33f8ef0181c769f5
cheers
Quoted 7 lines · Michael Ellerman
Quoted 7 lines
Early exits from
for_each_compatible_node()should decrement the node reference counter. Reported by Coccinelle:./arch/powerpc/platforms/44x/fsp2.c:206:1-25: WARNING: Function "
for_each_compatible_node" should haveof_node_put()before return around line 218.
Quoted 5 lines
Quoted 1 line
[...]
Applied to powerpc/next.
[1/1] powerpc/44x/fsp2: add missing
of_node_puthttps://git.kernel.org/powerpc/c/290fe8aa69ef5c51c778c0bb33f8ef0181c769f5
Thanks. :-)
Bixuan Cui