Skip to content

Commit c0faad6

Browse files
Bixuan Cuigregkh
authored andcommitted
powerpc/44x/fsp2: add missing of_node_put
[ Upstream commit 290fe8a ] 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. Fixes: 7813043 ("powerpc/44x/fsp2: Add irq error handlers") Signed-off-by: Bixuan Cui <cuibixuan@linux.alibaba.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/1635406102-88719-1-git-send-email-cuibixuan@linux.alibaba.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4310970 commit c0faad6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • arch/powerpc/platforms/44x

‎arch/powerpc/platforms/44x/fsp2.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,15 @@ static void node_irq_request(const char *compat, irq_handler_t errirq_handler)
208208
if (irq == NO_IRQ) {
209209
pr_err("device tree node %pOFn is missing a interrupt",
210210
np);
211+
of_node_put(np);
211212
return;
212213
}
213214

214215
rc = request_irq(irq, errirq_handler, 0, np->name, np);
215216
if (rc) {
216217
pr_err("fsp_of_probe: request_irq failed: np=%pOF rc=%d",
217218
np, rc);
219+
of_node_put(np);
218220
return;
219221
}
220222
}

0 commit comments

Comments
 (0)