[alsa-devel] [PATCH] ASoC: hdac_hda: Fix unbalanced bus link refcount at probe error

Takashi Iwai tiwai at suse.de
Fri May 31 17:43:03 CEST 2019


On Fri, 31 May 2019 17:31:10 +0200,
Ranjani Sridharan wrote:
> 
> On Fri, 2019-05-31 at 16:38 +0200, Takashi Iwai wrote:
> > The error paths in hdac_hda_codec_probe() don't take care of the bus
> > link refcount properly, which leave the refcount still high.
> > This patch addresses them.
> Hi Takashi,
> 
> Thanks for this. But I looked into hdac_hdmi probe and we have a
> similar problem there as well. 

Well, hdac_hdmi is a bit different.  It seems managing the link at
runtime PM.  The link put is called at suspend, while get again at
resume.

What I'm not sure for now is whether it's safe to assume the device
being suspended at the driver removal.  If this is always correct, the
link put should have been called already by runtime suspend at removal
time.

Still the code is a bit too fragile, yeah...


Takashi


More information about the Alsa-devel mailing list