diff options
| author | Kees Cook <kees+treewide@kernel.org> | 2026-09-17 14:14:47 -0700 |
|---|---|---|
| committer | Linus Walleij <linusw@kernel.org> | 2026-09-30 15:21:12 +0200 |
| commit | 07ba49a119bb38bfdc44d9db5280afd9c27714d0 (patch) | |
| tree | eb3cb694a8bb8f044e9239017f37251997b657cb /include/linux | |
| parent | cbb91e55a9d5227e53531ec5cc726411c9196a3d (diff) | |
| download | linux-next-07ba49a119bb38bfdc44d9db5280afd9c27714d0.tar.gz linux-next-07ba49a119bb38bfdc44d9db5280afd9c27714d0.zip | |
pinctrl: imx: Remove const from group_names allocation type
In preparation for making the devm_kmalloc family of allocators type
aware, we need to make sure that the returned type from the allocation
matches the type of the variable being assigned. (Before, the allocator
would always return "void *", which can be implicitly cast to any
pointer type.)
The assigned type is "const char **", but the converted allocation type
would be "const char * const *", as the size was taken from
"*func->groups", whose type "const char * const" is const qualified. As
there is no general way to remove const qualifiers, take the size from
the assignment target instead. No change in allocation size results.
Build tested ARCH=x86_64 allmodconfig with GCC 16.2.0:
drivers/pinctrl/freescale/pinctrl-imx.o
Assisted-by: LLM coccinelle
Signed-off-by: Kees Cook <kees+treewide@kernel.org>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
