summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-06-19 05:32:11 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-21 07:02:07 +0200
commit7478b14595a8467ade8971e2bbd94ffdcb3f3c78 (patch)
tree6b4078ff254ae082d23b4d2cad958f65a6f2c7e7 /drivers
parent59f9a95b1697b92c5e0752a1475dd92f1d7b4434 (diff)
downloadbarebox-7478b14595a8467ade8971e2bbd94ffdcb3f3c78.tar.gz
barebox-7478b14595a8467ade8971e2bbd94ffdcb3f3c78.tar.xz
nvmem: regmap: fix use of uninitialized space with nvmem_regmap_register
Looking through all instances of struct nvmem_config in the tree shows that only the new nvmem_regmap_register failed to initialize all members, e.g. config::read_only was uninitialized. Fix this up. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210619033212.3391-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvmem/regmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvmem/regmap.c b/drivers/nvmem/regmap.c
index 346d2516f3..641e6413ba 100644
--- a/drivers/nvmem/regmap.c
+++ b/drivers/nvmem/regmap.c
@@ -60,7 +60,7 @@ static struct nvmem_bus nvmem_regmap_bus = {
struct nvmem_device *nvmem_regmap_register(struct regmap *map, const char *name)
{
- struct nvmem_config config;
+ struct nvmem_config config = {};
/* Can be retrofitted if needed */
if (regmap_get_reg_stride(map) != regmap_get_val_bytes(map))