Re: [PATCH] ASoC: dapm: Do not traverse widget hooks to snd-soc-dummy

From: Pan, Harry
Date: Thu Mar 17 2016 - 09:04:28 EST

> I'd say as a quick fix for stable check that card is not NULL in
> dapm_widget_show_component(). And as a longterm fix get rid of
> dapm_widget
> file. Nobody should hopefully use it anymore with debugfs being
> available as
> the far better alternative.
> - Lars

Well, that was my original approach while I realized problem
is caused by de-referencing a null pointer to its member of
'widget' list.


+ÂÂÂif (WARN_ON(!codec->component.card))
+ÂÂÂÂÂÂÂreturn 0;

Additional remark is that I was working on chromium-os v3.18 kernel,
so that the interface and argument are sort of different than what
I then cherry-pick'ed then sent, which was based on latest 4.5.

Then I was stuck at here couple days keeping hunting root cause,
Turned out I found that commit skipped probing dummy component.

Long story short.