Re: [PATCH] ASoC: sma1307: fix uninitialized variable refence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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


[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux