pstore/ram: Move pmsg init earlier
[platform/kernel/linux-rpi.git] / fs / pstore / ram.c
index 348820a..2f18563 100644 (file)
@@ -785,6 +785,11 @@ static int ramoops_probe(struct platform_device *pdev)
        if (err)
                goto fail_init;
 
+       err = ramoops_init_prz("pmsg", dev, cxt, &cxt->mprz, &paddr,
+                               cxt->pmsg_size, 0);
+       if (err)
+               goto fail_init;
+
        cxt->max_ftrace_cnt = (cxt->flags & RAMOOPS_FLAG_FTRACE_PER_CPU)
                                ? nr_cpu_ids
                                : 1;
@@ -796,11 +801,6 @@ static int ramoops_probe(struct platform_device *pdev)
        if (err)
                goto fail_init;
 
-       err = ramoops_init_prz("pmsg", dev, cxt, &cxt->mprz, &paddr,
-                               cxt->pmsg_size, 0);
-       if (err)
-               goto fail_init;
-
        cxt->pstore.data = cxt;
        /*
         * Prepare frontend flags based on which areas are initialized.