Commit f858b6f2 authored by Peter De Schrijver's avatar Peter De Schrijver Committed by Stephen Warren

ARM: tegra: fix return value for debugfs init

tegra_powergate_debugfs_init() always returns -ENOMEM. It shouldn't do that
when registering the debugfs entry succeeded.
Signed-off-by: default avatarPeter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
parent 4cbe5a55
...@@ -237,14 +237,13 @@ static const struct file_operations powergate_fops = { ...@@ -237,14 +237,13 @@ static const struct file_operations powergate_fops = {
int __init tegra_powergate_debugfs_init(void) int __init tegra_powergate_debugfs_init(void)
{ {
struct dentry *d; struct dentry *d;
int err = -ENOMEM;
d = debugfs_create_file("powergate", S_IRUGO, NULL, NULL, d = debugfs_create_file("powergate", S_IRUGO, NULL, NULL,
&powergate_fops); &powergate_fops);
if (!d) if (!d)
return -ENOMEM; return -ENOMEM;
return err; return 0;
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment