summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2025-12-01 15:39:06 +0300
committerMark Brown <broonie@kernel.org>2025-12-17 15:04:37 +0300
commit9a123f222e1889d020d873aa6e0799098d22cdb1 (patch)
tree7d237db537c974cb7053d19b24d5fbaa68476177 /include/linux
parent22937af75abb3260c2d563739181f4b61ddac2c1 (diff)
downloadlinux-9a123f222e1889d020d873aa6e0799098d22cdb1.tar.xz
ASoC: cs-amp-lib: Replace __free(kfree) with normal kfree() cleanup
Replace the use of __free(kfree) in _cs_amp_set_efi_calibration_data() with normal kfree() at the end of the function. Krzysztof Kozlowski pointed out that __free() can be dangerous. It can introduce new cleanup bugs. These are more subtle and difficult to spot than a missing goto in traditional cleanup, because they are triggered by writing regular idiomatic C code instead of using C++ conventions. As it's regular C style it's more likely to be missed because the code is as would be expected for C. The traditional goto also more obviously flags to anyone changing the code in the future that they must be careful about the cleanup. Arguably the traditional approach is more readable, and it avoids the manipulation of __free() pointers when the buffer is reallocated for resizing. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20251201123906.86876-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions