git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee895cc
)
misc: sram: fix device node reference leak on error
author
Vladimir Zapolskiy
<vladimir_zapolskiy@mentor.com>
Mon, 1 Jun 2015 12:29:55 +0000
(15:29 +0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 13 Jun 2015 00:03:56 +0000
(17:03 -0700)
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>
drivers/misc/sram.c
patch
|
blob
|
history
diff --git
a/drivers/misc/sram.c
b/drivers/misc/sram.c
index
76a23f9
..
0bfdfac
100644
(file)
--- 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;
}