From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754481AbdFWG2i (ORCPT ); Fri, 23 Jun 2017 02:28:38 -0400 Received: from smtp08.smtpout.orange.fr ([80.12.242.130]:31234 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754283AbdFWG2g (ORCPT ); Fri, 23 Jun 2017 02:28:36 -0400 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 23 Jun 2017 08:28:34 +0200 X-ME-IP: 92.140.158.134 From: Christophe JAILLET To: bp@suse.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] RAS: Fix an error checking test in 'create_debugfs_nodes()' Date: Fri, 23 Jun 2017 08:24:40 +0200 Message-Id: <20170623062440.6726-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'decay' is kwown to be not NULL at this point. 'count' should be tested instead. Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector") Signed-off-by: Christophe JAILLET --- drivers/ras/cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c index 6aab46d91d33..d0e5d6ee882c 100644 --- a/drivers/ras/cec.c +++ b/drivers/ras/cec.c @@ -481,7 +481,7 @@ static int __init create_debugfs_nodes(void) count = debugfs_create_file("count_threshold", S_IRUSR | S_IWUSR, d, &count_threshold, &count_threshold_ops); - if (!decay) { + if (!count) { pr_warn("Error creating count_threshold debugfs node!\n"); goto err; } -- 2.11.0