Skip to content

Commit

Permalink
dmaengine: fsl_raid: add missing of_node_put() in fsl_re_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Vinod Koul committed Aug 22, 2016
1 parent 06777c4 commit 93e11eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/dma/fsl_raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 93e11eb

Please sign in to comment.