[alsa-devel] [GIT PULL] ASoC updates for v3.18

Nicolin Chen nicoleotsuka at gmail.com
Tue Oct 7 20:01:36 CEST 2014


On Tue, Oct 07, 2014 at 06:14:36PM +0100, Mark Brown wrote:
> On Mon, Oct 06, 2014 at 02:37:53PM +0200, Takashi Iwai wrote:
> > Mark Brown wrote:
> 
> > However, this resulted in a few new build warnings, and some of them
> > look correctly reported.
> 
> > *  sound/soc/codecs/mc13783.c:787:13: warning: 'np' may be used uninitialized in this function [-Wuninitialized]
> 
> > The call of_node_put(np) is done unconditionally even for non-NULL
> > pdata where np isn't initialized.  This may lead to a real crash.
> 
> > * sound/soc/fsl/eukrea-tlv320.c:221:14: warning: 'ssi_np' may be used uninitialized in this function [-Wuninitialized]
> 
> > A similar bug: of_node_put(ssi_np) is reached even before ssi_np is
> > initialized.
> 
> > * sound/soc/fsl/imx-es8328.c:196:13: warning: 'codec_np' may be used uninitialized in this function [-Wuninitialized]
> > * sound/soc/fsl/imx-es8328.c:195:13: warning: 'ssi_np' may be used uninitialized in this function [-Wuninitialized]
> 
> > Ditto. 
> 
> > Relevant people put in Cc.  I hope I'll get a new pull request soon
> > later :)
> 
> You missed CCing the Freescale guys and Timur so you're missing most of
> the relevant people here; adding them now.

Generally we fetch ssi_np and codec_np before other operations.
But somehow these two are doing the fetching a bit later.

However, I think the below change can be a quick reasonable fix:
-       struct device_node *ssi_np, *codec_np;
+       struct device_node *codec_np = NULL;
+       struct device_node *ssi_np = NULL;

I'm patching and taking build test. Will send them soon.

Thanks
Nicolin


More information about the Alsa-devel mailing list