diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 40bfc6c58374..1e675be10926 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -297,6 +297,7 @@ static ssize_t ramoops_pstore_read(struct pstore_record *record) GFP_KERNEL); if (!tmp_prz) return -ENOMEM; + prz = tmp_prz; free_prz = true; while (cxt->ftrace_read_cnt < cxt->max_ftrace_cnt) { @@ -319,7 +320,6 @@ static ssize_t ramoops_pstore_read(struct pstore_record *record) goto out; } record->id = 0; - prz = tmp_prz; } }