diff options
author | Andrew Goodbody <andrew.goodbody@linaro.org> | 2025-07-28 17:12:13 +0100 |
---|---|---|
committer | Eugen Hristev <eugen.hristev@linaro.org> | 2025-08-13 12:59:36 +0300 |
commit | b824136ab4f743e09c81af531d430dbe6a2d92bf (patch) | |
tree | 606c6b5667df5a2cd3770f091027cef86ee86777 | |
parent | da13ce8a6b1a37c49d2215ef78ee7984bae1c068 (diff) |
mfd: atmel-smc: Ensure match is initialised
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>
-rw-r--r-- | drivers/mfd/atmel-smc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/atmel-smc.c b/drivers/mfd/atmel-smc.c index 15296f71a16..94e5e7b67a0 100644 --- 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; |