Commit 1e25ee6d authored by Olof Johansson's avatar Olof Johansson

Merge tag 'at91-4.20-drivers' of...

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: default avatarOlof Johansson <olof@lixom.net>
parents 2e07bdf9 f62df676
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment