Skip to content

Commit 43cd4b6

Browse files
tititiou36gregkh
authored andcommitted
misc: rp1: Fix an error handling path in rp1_probe()
When DT is used to get the reference of 'rp1_node', it should be released when not needed anymore, otherwise it is leaking. In such a case, add the missing of_node_put() call at the end of the probe, as already done in the error handling path. Fixes: 49d6397 ("misc: rp1: RaspberryPi RP1 misc driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Andrea della Porta <andrea.porta@suse.com> Link: https://patch.msgid.link/9bc1206de787fa86384f3e5ba0a8027947bc00ff.1762585959.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 85e8378 commit 43cd4b6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/misc/rp1/rp1_pci.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ static int rp1_probe(struct pci_dev *pdev, const struct pci_device_id *id)
289289
goto err_unload_overlay;
290290
}
291291

292+
if (skip_ovl)
293+
of_node_put(rp1_node);
294+
292295
return 0;
293296

294297
err_unload_overlay:

0 commit comments

Comments
 (0)