projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nvmem: core: Fix a resource leak on error in nvmem_add_cells_from_of()
[linux-2.6-microblaze.git]
/
drivers
/
nvmem
/
core.c
diff --git
a/drivers/nvmem/core.c
b/drivers/nvmem/core.c
index
177f5bf
..
68ae6f2
100644
(file)
--- a/
drivers/nvmem/core.c
+++ b/
drivers/nvmem/core.c
@@
-713,6
+713,7
@@
static int nvmem_add_cells_from_of(struct nvmem_device *nvmem)
cell->name, nvmem->stride);
/* Cells already added will be freed later. */
kfree_const(cell->name);
+ of_node_put(cell->np);
kfree(cell);
return -EINVAL;
}