lkml.org 
[lkml]   [2022]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] memory: samsung: exynos5422-dmc: Avoid some over memory allocation
Date
On Sun, 20 Mar 2022 08:10:30 +0100, Christophe JAILLET wrote:
> '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.
>
> [...]

Applied, thanks!

[1/1] memory: samsung: exynos5422-dmc: Avoid some over memory allocation
commit: 56653827f0d7bc7c2d8bac0e119fd1521fa9990a

Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

\
 
 \ /
  Last update: 2022-04-05 00:28    [W:0.055 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site