On Wed, Nov 13, 2024 at 11:43:12PM +0100, Arnd Bergmann wrote: > On Wed, Nov 13, 2024, at 14:24, Mark Brown wrote: > > There is one path in the actual implementation that returns an error > > code without setting fw, though most do. Either this caller should be > > updated to check the return code or if checking fw alone is valid (which > > TBH does look like the intent) the stub should be updated to set it. > From what I saw earlier, the fw pointer gets set exactly in the > same cases that return success (through *firmware_p), checking one > or the other is almost the same, but you are totally right checking > the return code is the right thing to do here, plus it avoids > the pointless release_firmware(NULL). Yeah, the case I noticed that doesn't set firmware_p is the check for firmware_p where it's kind of unavoidable.
Attachment:
signature.asc
Description: PGP signature
- References:
- [PATCH] ASoC: sma1307: fix uninitialized variable refence
- From: Arnd Bergmann
- Re: [PATCH] ASoC: sma1307: fix uninitialized variable refence
- From: Mark Brown
- Re: [PATCH] ASoC: sma1307: fix uninitialized variable refence
- From: Arnd Bergmann
- [PATCH] ASoC: sma1307: fix uninitialized variable refence
- Prev by Date: Re: [PATCH] ASoC: sdca: test adev before calling acpi_dev_for_each_child
- Next by Date: Re: [RESEND v2] ASoC: hdmi-codec: reorder channel allocation list
- Previous by thread: Re: [PATCH] ASoC: sma1307: fix uninitialized variable refence
- Next by thread: [PATCH][next] ASoC: SOF: ipc4-topology: remove redundant assignment to variable ret
- Index(es):