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>
This commit is contained in:
committed by
Tony Lindgren
parent
78737ae1b0
commit
0825cc8a6f
@@ -391,7 +391,7 @@ static struct dentry *clk_debugfs_root;
|
|||||||
static int clk_debugfs_register_one(struct clk *c)
|
static int clk_debugfs_register_one(struct clk *c)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct dentry *d, *child;
|
struct dentry *d, *child, *child_tmp;
|
||||||
struct clk *pa = c->parent;
|
struct clk *pa = c->parent;
|
||||||
char s[255];
|
char s[255];
|
||||||
char *p = s;
|
char *p = s;
|
||||||
@@ -423,7 +423,7 @@ static int clk_debugfs_register_one(struct clk *c)
|
|||||||
|
|
||||||
err_out:
|
err_out:
|
||||||
d = c->dent;
|
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(child);
|
||||||
debugfs_remove(c->dent);
|
debugfs_remove(c->dent);
|
||||||
return err;
|
return err;
|
||||||
|
Reference in New Issue
Block a user