diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-09-02 13:59:17 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2025-09-08 14:22:16 +0200 |
commit | aae7a2876c3b39d07aa7655ea082af8e7862f3a5 (patch) | |
tree | 7f21a79c26e07477cbd040fad36b7d4bf9871af8 /rust/helpers/of.c | |
parent | ea22f777fc43e55fb9f0d1a1f873cfab29219d8e (diff) |
pinctrl: keembay: release allocated memory in detach path
Unlike all the other allocations in this driver, the memory for storing
the pin function descriptions allocated with kcalloc() and later resized
with krealloc() is never freed. Use devres like elsewhere to handle
that. While at it - replace krealloc() with more suitable
devm_krealloc_array().
Note: the logic in this module is pretty convoluted and could probably
use some revisiting, we should probably be able to calculate the exact
amount of memory needed in advance or even skip the allocation
altogether and just add each function to the radix tree separately.
Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'rust/helpers/of.c')
0 files changed, 0 insertions, 0 deletions