From b8cbc429050e3f9dd93bfee8461627d37d048e18 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Mon, 8 Dec 2014 15:06:52 -0800 Subject: [PATCH] [PATCH v2 2/5] 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: Mark Salyzyn Acked-by: Kees Cook v2: renumber pmsg series dependencies Change-Id: Ie21c988ae0b1ebb0dafa6c0c0b069e9cfe1e8506 --- fs/pstore/ram.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 1107bc1edd92..a05dc23d954c 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -441,14 +441,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 @@ -493,7 +485,6 @@ fail_buf: fail_clear: cxt->pstore.bufsize = 0; cxt->max_dump_cnt = 0; -fail_cnt: kfree(cxt->fprz); fail_init_fprz: kfree(cxt->cprz); -- 2.34.1