Commit ff6bf6e8 authored by Mark Salyzyn's avatar Mark Salyzyn Committed by Tony Luck
Browse files

pstore: Remove superfluous memory size check



All previous checks will fail with error if memory size
is not sufficient to register a zone, so this legacy
check has become redundant.
Signed-off-by: default avatarMark Salyzyn <salyzyn@android.com>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent dbaffde7
......@@ -474,14 +474,6 @@ static int ramoops_probe(struct platform_device *pdev)
if (err)
goto fail_init_fprz;
if (!cxt->przs && !cxt->cprz && !cxt->fprz) {
pr_err("memory size too small, minimum is %zu\n",
cxt->console_size + cxt->record_size +
cxt->ftrace_size);
err = -EINVAL;
goto fail_cnt;
}
cxt->pstore.data = cxt;
/*
* Console can handle any buffer size, so prefer LOG_LINE_MAX. If we
......@@ -525,7 +517,6 @@ static int ramoops_probe(struct platform_device *pdev)
kfree(cxt->pstore.buf);
fail_clear:
cxt->pstore.bufsize = 0;
fail_cnt:
kfree(cxt->fprz);
fail_init_fprz:
kfree(cxt->cprz);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment