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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user