From 32288daf3f2439f57167c03cd679c2eba28923b7 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Mon, 26 Jun 2017 14:35:32 +0200 Subject: RAS/CEC: Check the correct variable in the debugfs error handling Check the correct variable when handling a potential error from debugfs_create_file(). Most likely a copy-paste botch. [ Rewrite commit message. ] Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector") Signed-off-by: Christophe JAILLET Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170623062440.6726-1-christophe.jaillet@wanadoo.fr --- drivers/ras/cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/ras') 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; } -- cgit v1.2.3