arm: don't create useless copies to pass into debugfs_create_dir()
its first argument is const char * and it's really not modified...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index 1d8509d..7d107be 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -636,15 +636,12 @@
struct dentry *p_dentry)
{
struct dentry *d, *clk_d;
- char s[255];
- char *p = s;
+ const char *p = c->name;
- if (c->name == NULL)
- p += sprintf(p, "BUG");
- else
- p += sprintf(p, "%s", c->name);
+ if (!p)
+ p = "BUG";
- clk_d = debugfs_create_dir(s, p_dentry);
+ clk_d = debugfs_create_dir(p, p_dentry);
if (!clk_d)
return NULL;