linux-sg2042/drivers/memory/samsung
Christophe JAILLET 56653827f0 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: 6e7674c3c6 ("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>
2022-04-04 18:30:14 +02:00
..
Kconfig memory: samsung: describe drivers in KConfig 2021-09-28 12:38:36 +02:00
Makefile memory: Add DMC driver for Exynos5422 2019-10-01 20:28:38 +02:00
exynos-srom.c memory: samsung: exynos-srom: Correct alignment 2020-07-27 11:13:33 +02:00
exynos-srom.h memory: samsung: Add SPDX license identifiers 2018-02-12 19:55:34 +01:00
exynos5422-dmc.c memory: samsung: exynos5422-dmc: Avoid some over memory allocation 2022-04-04 18:30:14 +02:00