diff options
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r-- | fs/ubifs/debug.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 304cc6e1c84b..645737769c98 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -2808,25 +2808,25 @@ int dbg_debugfs_init_fs(struct ubifs_info *c) | |||
2808 | sprintf(d->dfs_dir_name, "ubi%d_%d", c->vi.ubi_num, c->vi.vol_id); | 2808 | sprintf(d->dfs_dir_name, "ubi%d_%d", c->vi.ubi_num, c->vi.vol_id); |
2809 | fname = d->dfs_dir_name; | 2809 | fname = d->dfs_dir_name; |
2810 | dent = debugfs_create_dir(fname, dfs_rootdir); | 2810 | dent = debugfs_create_dir(fname, dfs_rootdir); |
2811 | if (IS_ERR(dent)) | 2811 | if (IS_ERR_OR_NULL(dent)) |
2812 | goto out; | 2812 | goto out; |
2813 | d->dfs_dir = dent; | 2813 | d->dfs_dir = dent; |
2814 | 2814 | ||
2815 | fname = "dump_lprops"; | 2815 | fname = "dump_lprops"; |
2816 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); | 2816 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); |
2817 | if (IS_ERR(dent)) | 2817 | if (IS_ERR_OR_NULL(dent)) |
2818 | goto out_remove; | 2818 | goto out_remove; |
2819 | d->dfs_dump_lprops = dent; | 2819 | d->dfs_dump_lprops = dent; |
2820 | 2820 | ||
2821 | fname = "dump_budg"; | 2821 | fname = "dump_budg"; |
2822 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); | 2822 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); |
2823 | if (IS_ERR(dent)) | 2823 | if (IS_ERR_OR_NULL(dent)) |
2824 | goto out_remove; | 2824 | goto out_remove; |
2825 | d->dfs_dump_budg = dent; | 2825 | d->dfs_dump_budg = dent; |
2826 | 2826 | ||
2827 | fname = "dump_tnc"; | 2827 | fname = "dump_tnc"; |
2828 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); | 2828 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); |
2829 | if (IS_ERR(dent)) | 2829 | if (IS_ERR_OR_NULL(dent)) |
2830 | goto out_remove; | 2830 | goto out_remove; |
2831 | d->dfs_dump_tnc = dent; | 2831 | d->dfs_dump_tnc = dent; |
2832 | 2832 | ||
@@ -2835,7 +2835,7 @@ int dbg_debugfs_init_fs(struct ubifs_info *c) | |||
2835 | out_remove: | 2835 | out_remove: |
2836 | debugfs_remove_recursive(d->dfs_dir); | 2836 | debugfs_remove_recursive(d->dfs_dir); |
2837 | out: | 2837 | out: |
2838 | err = PTR_ERR(dent); | 2838 | err = dent ? PTR_ERR(dent) : -ENODEV; |
2839 | ubifs_err("cannot create \"%s\" debugfs directory, error %d\n", | 2839 | ubifs_err("cannot create \"%s\" debugfs directory, error %d\n", |
2840 | fname, err); | 2840 | fname, err); |
2841 | return err; | 2841 | return err; |