projects
/
users
/
mchehab
/
rasdaemon.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
899fcc2
)
rasdaemon: mce-amd-smca: properly limit bank types
author
Aristeu Rozanski <arozansk@redhat.com>
Thu, 19 Jan 2023 13:45:57 +0000
(08:45 -0500)
committer
Mauro Carvalho Chehab <mchehab@kernel.org>
Sat, 21 Jan 2023 06:27:38 +0000
(07:27 +0100)
Found with covscan.
Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
mce-amd-smca.c
patch
|
blob
|
history
diff --git
a/mce-amd-smca.c
b/mce-amd-smca.c
index f3379fcaddf450168b4f976d5f41ca7cd632926e..27ca8aac50ba491153374563fdebaaffddea91b7 100644
(file)
--- a/
mce-amd-smca.c
+++ b/
mce-amd-smca.c
@@
-584,7
+584,7
@@
static void decode_smca_error(struct mce_event *e)
return;
}
- if (bank_type >=
MAX_NR_BANK
S) {
+ if (bank_type >=
N_SMCA_BANK_TYPE
S) {
strcpy(e->mcastatus_msg, "Don't know how to decode this bank");
return;
}