[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZzXf-kdRnDk6-sGx@finisterre.sirena.org.uk>
Date: Thu, 14 Nov 2024 11:33:14 +0000
From: Mark Brown <broonie@...nel.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Arnd Bergmann <arnd@...nel.org>, Kiseok Jo <kiseok.jo@...ndevice.com>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Tang Bin <tangbin@...s.chinamobile.com>,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: sma1307: fix uninitialized variable refence
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists