Skip to content

Commit

Permalink
ARM: tegra: fix return value for debugfs init
Browse files Browse the repository at this point in the history
tegra_powergate_debugfs_init() always returns -ENOMEM. It shouldn't do that
when registering the debugfs entry succeeded.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
  • Loading branch information
Peter De Schrijver authored and Stephen Warren committed Sep 6, 2012
1 parent 4cbe5a5 commit f858b6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/arm/mach-tegra/powergate.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,13 @@ static const struct file_operations powergate_fops = {
int __init tegra_powergate_debugfs_init(void)
{
struct dentry *d;
int err = -ENOMEM;

d = debugfs_create_file("powergate", S_IRUGO, NULL, NULL,
&powergate_fops);
if (!d)
return -ENOMEM;

return err;
return 0;
}

#endif

0 comments on commit f858b6f

Please sign in to comment.