summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-08-10 13:44:56 +0000
committerVinod Koul <vinod.koul@intel.com>2016-08-22 11:51:34 +0530
commit93e11eb1b745ee8dbd4f98f24b542d496c8f1e03 (patch)
tree47f3a4395f625d909aa31e9e58683dd8c61cd74e /drivers/dma
parent06777c4ec78a43977b63f1d5045def057227c2c5 (diff)
downloadlwn-93e11eb1b745ee8dbd4f98f24b542d496c8f1e03.tar.gz
lwn-93e11eb1b745ee8dbd4f98f24b542d496c8f1e03.zip
dmaengine: fsl_raid: add missing of_node_put() in fsl_re_probe()
When terminating for_each_compatible_node() iteration with break or return, of_node_put() should be used to prevent stale device node references from being left behind. Found by Coccinelle. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/fsl_raid.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c
index aad167eaaee8..de2a2a2b1d75 100644
--- a/drivers/dma/fsl_raid.c
+++ b/drivers/dma/fsl_raid.c
@@ -836,6 +836,7 @@ static int fsl_re_probe(struct platform_device *ofdev)
rc = of_property_read_u32(np, "reg", &off);
if (rc) {
dev_err(dev, "Reg property not found in JQ node\n");
+ of_node_put(np);
return -ENODEV;
}
/* Find out the Job Rings present under each JQ */