mtd: pmcmsp-flash: Allocating too much in init_msp_flash()
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / ubi / debug.c
index b077e43b5ba913b2ba208ed54673c3fe291afc66..c4cb15a3098c0933f607e4f0cba170e978f910ff 100644 (file)
@@ -236,7 +236,7 @@ int ubi_debugfs_init(void)
 
        dfs_rootdir = debugfs_create_dir("ubi", NULL);
        if (IS_ERR_OR_NULL(dfs_rootdir)) {
-               int err = dfs_rootdir ? -ENODEV : PTR_ERR(dfs_rootdir);
+               int err = dfs_rootdir ? PTR_ERR(dfs_rootdir) : -ENODEV;
 
                pr_err("UBI error: cannot create \"ubi\" debugfs directory, error %d\n",
                       err);