summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMarek Skuczynski <mareksk7@gmail.com>2010-01-31 10:00:54 +0000
committerTony Lindgren <tony@atomide.com>2010-02-03 08:48:06 -0800
commit0825cc8a6ffa54c87ad7ad914a16d6c035627935 (patch)
treeafeaec65198ab6a42990dc259ff78a7bb829b21a /arch
parent78737ae1b0f0b425e8eb72a9c84125fa8cac8e8e (diff)
downloadop-kernel-dev-0825cc8a6ffa54c87ad7ad914a16d6c035627935.zip
op-kernel-dev-0825cc8a6ffa54c87ad7ad914a16d6c035627935.tar.gz
omap: Fix access to already released memory in clk_debugfs_register_one()
I have found an access to already released memory in clk_debugfs_register_one() function. Signed-off-by: Marek Skuczynski <mareksk7@gmail.com> Acked-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-omap/clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index d9f8c84..4becbdd 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -391,7 +391,7 @@ static struct dentry *clk_debugfs_root;
static int clk_debugfs_register_one(struct clk *c)
{
int err;
- struct dentry *d, *child;
+ struct dentry *d, *child, *child_tmp;
struct clk *pa = c->parent;
char s[255];
char *p = s;
@@ -423,7 +423,7 @@ static int clk_debugfs_register_one(struct clk *c)
err_out:
d = c->dent;
- list_for_each_entry(child, &d->d_subdirs, d_u.d_child)
+ list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child)
debugfs_remove(child);
debugfs_remove(c->dent);
return err;
OpenPOWER on IntegriCloud