[PATCH v2 2/5] pstore: remove superfluous memory size check
authorMark Salyzyn <salyzyn@google.com>
Mon, 8 Dec 2014 23:06:52 +0000 (15:06 -0800)
committerMark Salyzyn <salyzyn@google.com>
Wed, 14 Jan 2015 00:18:42 +0000 (16:18 -0800)
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 <salyzyn@android.com>
Acked-by: Kees Cook <keescook@chromium.org>
v2: renumber pmsg series dependencies

Change-Id: Ie21c988ae0b1ebb0dafa6c0c0b069e9cfe1e8506

fs/pstore/ram.c

index 1107bc1edd9215c217713a8e8e7f36224faaa612..a05dc23d954c3983166d702e215f1f17a7173b7a 100644 (file)
@@ -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);