Re: [PATCH 13/31] ASoC: rt1320-sdw: Use auto-cleanup for firmware loading
Mark Brown <[email protected]> Wed, 5 Aug 2026 23:56:23 +0100
| Newsgroups | org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 05, 2026 at 03:52:14PM +0200, Takashi Iwai wrote:
> Simplify the code to manage the firmware loading with __free(firmware)
> auto-cleanup.
>
> Only the code refactoring, no functional changes.
> @@ -2170,6 +2164,7 @@ struct rt1320_dspfwheader {
> goto _exit_;
> }
>
> + const struct firmware *fw __free(firmware) = NULL;
> request_firmware(&fw, filename, dev);
> if (fw) {
> fwheader = (struct rt1320_dspfwheader *)fw->data;
There's a goto further up that jumps over this which clang warns about,
this will break the build. Landmines like that are why cleanup.h warns
about mixing it with goto.
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmpzv5YACgkQJNaLcl1U h9ASBgf/YGFBQ9llutsBdL8UP+TiYaB8leRoB5lA0mVIQfofVRetKqFrTBrC23e/ M1pNovzkKqbZomkpoDhLeD2lwOha3x8qD4JSDYir8UdldbsamPgPqOKMzJ0KCrVh +AYih8O7tvM9vlQZcQiMOpNlhDNlI3z57gXosZ7T9nvhp7ycuTJmDj1S6VgxS3ZN b310Yq7NnzoQ+bacPQHDAbsiNg9DZZxgnFAbem/pFezfrClKgeAp9HYyVX8wcxSG 3BiLX6ZwbWeZJk3TfL1ehsS8EsPAs5NrKNHH2ucDsvPFNMPyIZ4lUYqQFZ81jgsc X5ll2e5uuc45nxWFpZlCtWXBCDeUQA== =A3sy -----END PGP SIGNATURE-----