RAS/CEC: Check the correct variable in the debugfs error handling
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 26 Jun 2017 12:35:32 +0000 (14:35 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 26 Jun 2017 13:58:57 +0000 (15:58 +0200)
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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170623062440.6726-1-christophe.jaillet@wanadoo.fr
drivers/ras/cec.c

index 6aab46d91d3319d1d942e98b916c0eb0992c62f8..d0e5d6ee882c4e041d8c3db4e41392d9bc6d90ab 100644 (file)
@@ -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;
        }