* [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
* Re: [PATCH] RAS: Fix an error checking test in 'create_debugfs_nodes()'
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
1 sibling, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2017-06-23 8:12 UTC (permalink / raw)
To: Christophe JAILLET; +Cc: mingo, linux-kernel, kernel-janitors
On Fri, Jun 23, 2017 at 08:24:40AM +0200, Christophe JAILLET wrote:
> '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(-)
Applied, thanks.
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:ras/core] RAS/CEC: Check the correct variable in the debugfs error handling
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-bot for Christophe JAILLET
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Christophe JAILLET @ 2017-06-26 14:04 UTC (permalink / raw)
To: linux-tip-commits; +Cc: hpa, bp, linux-kernel, christophe.jaillet, mingo, tglx
Commit-ID: 32288daf3f2439f57167c03cd679c2eba28923b7
Gitweb: http://git.kernel.org/tip/32288daf3f2439f57167c03cd679c2eba28923b7
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
AuthorDate: Mon, 26 Jun 2017 14:35:32 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 26 Jun 2017 15:58:57 +0200
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 <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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c
index 6aab46d..d0e5d6e 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;
}
^ 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).