summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>2025-11-29 16:17:57 +0300
committerMark Brown <broonie@kernel.org>2025-12-14 13:33:15 +0300
commit0e6071d656fb284e003a45ce158831d4d12aac5a (patch)
tree34a34227199f6c3c91acb076254e89758f557ba5 /include/linux
parent3c84bfa47ff29ec0c202cb139d365421c6778d65 (diff)
downloadlinux-0e6071d656fb284e003a45ce158831d4d12aac5a.tar.xz
ASoC: qcom: audioreach: Fix confusing cleanup.h syntax
Commit 88a5f8e628ef ("ASoc: qcom: audioreach: Use automatic cleanup of kfree()") did not make the code simpler but more complicated. Already simple code of allocation and free, without any error paths, got now declaration with one constructor followed by another allocation, which 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> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251129-asoc-wrong-cleanup-h-can-people-stop-sending-this-without-reading-docs-v1-5-c38b06884e39@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions