linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RAS: Fix an error checking test in 'create_debugfs_nodes()'
@ 2017-06-23  6:24 Christophe JAILLET
  2017-06-23  8:12 ` Borislav Petkov
  2017-06-26 14:04 ` [tip:ras/core] RAS/CEC: Check the correct variable in the debugfs error handling tip-bot for Christophe JAILLET
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2017-06-23  6:24 UTC (permalink / raw)
  To: bp, mingo; +Cc: linux-kernel, kernel-janitors, Christophe JAILLET

'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 <christophe.jaillet@wanadoo.fr>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-26 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23  6:24 [PATCH] RAS: Fix an error checking test in 'create_debugfs_nodes()' Christophe JAILLET
2017-06-23  8:12 ` Borislav Petkov
2017-06-26 14:04 ` [tip:ras/core] RAS/CEC: Check the correct variable in the debugfs error handling tip-bot for Christophe JAILLET

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).