All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] ASoC: dapm: Implement and instantiate DAI widgets
@ 2017-01-19  7:38 Dan Carpenter
  2017-01-19  7:43 ` Dan Carpenter
  2017-01-19  9:20 ` Vinod Koul
  0 siblings, 2 replies; 7+ messages in thread
From: Dan Carpenter @ 2017-01-19  7:38 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel

Hello Mark Brown,

The patch 888df395ebc5: "ASoC: dapm: Implement and instantiate DAI
widgets" from Feb 16, 2012, leads to the following static checker
warning:

	sound/soc/soc-dapm.c:3944 snd_soc_dapm_new_dai_widgets()
	error: 'w' dereferencing possible ERR_PTR()

sound/soc/soc-dapm.c
  3929          if (dai->driver->playback.stream_name) {
  3930                  template.id = snd_soc_dapm_dai_in;
  3931                  template.name = dai->driver->playback.stream_name;
  3932                  template.sname = dai->driver->playback.stream_name;
  3933  
  3934                  dev_dbg(dai->dev, "ASoC: adding %s widget\n",
  3935                          template.name);
  3936  
  3937                  w = snd_soc_dapm_new_control_unlocked(dapm, &template);

This can either return NULL or ERR_PTR(-EPROBE_DEFER).

  3938                  if (!w) {
  3939                          dev_err(dapm->dev, "ASoC: Failed to create %s widget\n",
  3940                                  dai->driver->playback.stream_name);
  3941                          return -ENOMEM;
  3942                  }
  3943  
  3944                  w->priv = dai;
                        ^^^^^^^^^^^^^

  3945                  dai->playback_widget = w;
  3946          }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-01-20 12:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-19  7:38 [bug report] ASoC: dapm: Implement and instantiate DAI widgets Dan Carpenter
2017-01-19  7:43 ` Dan Carpenter
2017-01-19  9:20 ` Vinod Koul
2017-01-19 10:30   ` Dan Carpenter
2017-01-19 12:25     ` Lars-Peter Clausen
2017-01-20  9:52       ` Linus Walleij
2017-01-20 12:28         ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.