Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0825cc8a authored by Marek Skuczynski's avatar Marek Skuczynski Committed by Tony Lindgren
Browse files

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: default avatarMarek Skuczynski <mareksk7@gmail.com>
Acked-by: default avatarPaul Walmsley <paul@pwsan.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 78737ae1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;