aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/pstore/ram.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 6ad831b9d1b8..6d1393965b0a 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -288,10 +288,8 @@ static int notrace ramoops_pstore_write_buf(enum pstore_type_id type,
288 persistent_ram_write(cxt->fprz, buf, size); 288 persistent_ram_write(cxt->fprz, buf, size);
289 return 0; 289 return 0;
290 } else if (type == PSTORE_TYPE_PMSG) { 290 } else if (type == PSTORE_TYPE_PMSG) {
291 if (!cxt->mprz) 291 pr_warn_ratelimited("PMSG shouldn't call %s\n", __func__);
292 return -ENOMEM; 292 return -EINVAL;
293 persistent_ram_write(cxt->mprz, buf, size);
294 return 0;
295 } 293 }
296 294
297 if (type != PSTORE_TYPE_DMESG) 295 if (type != PSTORE_TYPE_DMESG)