diff options
author | Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> | 2015-06-01 14:29:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-13 02:03:56 +0200 |
commit | b13365bbecae98d31862df48f61522634ed5837d (patch) | |
tree | 1ef97f401788495e8042231b7cf885280b720e44 /drivers/misc/sram.c | |
parent | misc: sram: fix enabled clock leak on error path (diff) | |
download | linux-b13365bbecae98d31862df48f61522634ed5837d.tar.xz linux-b13365bbecae98d31862df48f61522634ed5837d.zip |
misc: sram: fix device node reference leak on error
A pointer device node reference should be decremented on manual exit
from for_each_available_child_of_node() loop.
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/sram.c')
-rw-r--r-- | drivers/misc/sram.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 76a23f9b5451..0bfdfacee972 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c @@ -112,6 +112,7 @@ static int sram_probe(struct platform_device *pdev) dev_err(&pdev->dev, "could not get address for node %s\n", child->full_name); + of_node_put(child); goto err_chunks; } @@ -120,6 +121,7 @@ static int sram_probe(struct platform_device *pdev) "reserved block %s outside the sram area\n", child->full_name); ret = -EINVAL; + of_node_put(child); goto err_chunks; } |