Skip to content

Commit

Permalink
omap: Fix access to already released memory in clk_debugfs_register_o…
Browse files Browse the repository at this point in the history
…ne()

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>
  • Loading branch information
Marek Skuczynski authored and Tony Lindgren committed Feb 3, 2010
1 parent 78737ae commit 0825cc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/plat-omap/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0825cc8

Please sign in to comment.