From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755851AbbAFRPu (ORCPT ); Tue, 6 Jan 2015 12:15:50 -0500 Received: from mail-ie0-f172.google.com ([209.85.223.172]:36586 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755559AbbAFRPs (ORCPT ); Tue, 6 Jan 2015 12:15:48 -0500 From: Mark Salyzyn To: linux-kernel@vger.kernel.org Cc: Mark Salyzyn , Anton Vorontsov , Colin Cross , Kees Cook , Tony Luck Subject: [PATCH 2/3] pstore: remove superfluous memory size check Date: Tue, 6 Jan 2015 09:15:40 -0800 Message-Id: <1420564543-24589-1-git-send-email-salyzyn@android.com> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- fs/pstore/ram.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 8613e5b..34ed8f8 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -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 @@ fail_buf: kfree(cxt->pstore.buf); fail_clear: cxt->pstore.bufsize = 0; -fail_cnt: kfree(cxt->fprz); fail_init_fprz: kfree(cxt->cprz); -- 2.2.0.rc0.207.ga3a616c