summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>2025-12-03 19:12:39 +0300
committerMark Brown <broonie@kernel.org>2025-12-14 13:34:45 +0300
commitbafd5cf04b2822bf3c865add7262d86e22b9588e (patch)
treedefdc432d9db6f11a7b2ce1b756e92d12679e841 /include/linux
parent5a7e236925b417332a674a8488ef19da233a5764 (diff)
downloadlinux-bafd5cf04b2822bf3c865add7262d86e22b9588e.tar.xz
ASoC: amd: acp-sdw-sof: Fix confusing cleanup.h syntax
Initializing automatic __free variables to NULL without need (e.g. branches with different allocations), followed by actual allocation is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this potential interdependency problem the recommendation is to always define and assign variables in one statement and not group variable definitions at the top of the function when __free() is used." Code does not have a bug, but is less readable and uses discouraged coding practice, so fix that by moving declaration to the place of assignment. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20251203-asoc-wrong-cleanup-h-continued-v1-2-5142be4874fb@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions