diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2022-03-20 08:10:30 +0100 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-04-04 18:30:14 +0200 |
commit | 56653827f0d7bc7c2d8bac0e119fd1521fa9990a (patch) | |
tree | 57cd5c2007c02b12d0b98914de83565a0ed41ffb /drivers/memory/emif.c | |
parent | 3123109284176b1532874591f7c81f3837bbdc17 (diff) | |
download | linux-56653827f0d7bc7c2d8bac0e119fd1521fa9990a.tar.bz2 |
memory: samsung: exynos5422-dmc: Avoid some over memory allocation
'dmc->counter' is a 'struct devfreq_event_dev **', so there is some
over memory allocation. 'counters_size' should be computed with
'sizeof(struct devfreq_event_dev *)'.
Use 'sizeof(*dmc->counter)' instead to fix it.
While at it, use devm_kcalloc() instead of devm_kzalloc()+open coded
multiplication.
Fixes: 6e7674c3c6df ("memory: Add DMC driver for Exynos5422")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/69d7e69346986e2fdb994d4382954c932f9f0993.1647760213.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'drivers/memory/emif.c')
0 files changed, 0 insertions, 0 deletions