git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da13ce8
)
mfd: atmel-smc: Ensure match is initialised
author
Andrew Goodbody
<andrew.goodbody@linaro.org>
Mon, 28 Jul 2025 16:12:13 +0000
(17:12 +0100)
committer
Eugen Hristev
<eugen.hristev@linaro.org>
Wed, 13 Aug 2025 09:59:36 +0000
(12:59 +0300)
If the test in the for loop is never matched then the variable 'match'
will never be assigned to. Provide an initial value so this cannot be a
problem.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/mfd/atmel-smc.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/atmel-smc.c
b/drivers/mfd/atmel-smc.c
index
15296f7
..
94e5e7b
100644
(file)
--- a/
drivers/mfd/atmel-smc.c
+++ b/
drivers/mfd/atmel-smc.c
@@
-347,7
+347,7
@@
const struct atmel_hsmc_reg_layout *
atmel_hsmc_get_reg_layout(ofnode np)
{
int i;
- const struct udevice_id *match;
+ const struct udevice_id *match
= NULL
;
const char *name;
int len;