summaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2018-09-25 13:19:52 -0700
committerOlof Johansson <olof@lixom.net>2018-09-25 13:19:52 -0700
commit1e25ee6d8083bb78e164d497989dc3cafda70fb8 (patch)
treeaf81865cbecb45f9e343a9b470b61f29f18595fa /drivers/memory
parent2e07bdf9e8d6adc8bf0113fd43f52363462fb659 (diff)
parentf62df676d7f16580fa5085a8f51a1cbe27f7dd10 (diff)
downloadlinux-1e25ee6d8083bb78e164d497989dc3cafda70fb8.tar.gz
linux-1e25ee6d8083bb78e164d497989dc3cafda70fb8.tar.bz2
linux-1e25ee6d8083bb78e164d497989dc3cafda70fb8.zip
Merge tag 'at91-4.20-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into next/drivers
AT91 drivers for 4.20 - use struct_size in atmel-ebi * tag 'at91-4.20-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: memory: atmel-ebi: Use struct_size() in devm_kzalloc() Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/atmel-ebi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index b907865d4664..c3748b414c27 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -327,8 +327,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np,
return -EINVAL;
}
- ebid = devm_kzalloc(ebi->dev,
- sizeof(*ebid) + (numcs * sizeof(*ebid->configs)),
+ ebid = devm_kzalloc(ebi->dev, struct_size(ebid, configs, numcs),
GFP_KERNEL);
if (!ebid)
return -ENOMEM;