Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[deliverable/linux.git] / fs / pstore / platform.c
index 4637ec4169cda589d1c230bc09699ed96b97ad60..422962ae9fc241ed05bddddd2a313150d5853f0b 100644 (file)
@@ -241,17 +241,15 @@ int pstore_register(struct pstore_info *psi)
 {
        struct module *owner = psi->owner;
 
+       if (backend && strcmp(backend, psi->name))
+               return -EPERM;
+
        spin_lock(&pstore_lock);
        if (psinfo) {
                spin_unlock(&pstore_lock);
                return -EBUSY;
        }
 
-       if (backend && strcmp(backend, psi->name)) {
-               spin_unlock(&pstore_lock);
-               return -EINVAL;
-       }
-
        if (!psi->write)
                psi->write = pstore_write_compat;
        psinfo = psi;
@@ -276,6 +274,9 @@ int pstore_register(struct pstore_info *psi)
                add_timer(&pstore_timer);
        }
 
+       pr_info("pstore: Registered %s as persistent store backend\n",
+               psi->name);
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(pstore_register);
This page took 0.034049 seconds and 5 git commands to generate.