[alsa-devel] [PATCH 1/3] ALSA: hda - Handle error from snd_hda_power_up*()

Takashi Iwai tiwai at suse.de
Wed Jun 27 18:09:35 CEST 2018


On Wed, 27 Jun 2018 17:54:31 +0200,
Chris Wilson wrote:
> 
> Quoting Takashi Iwai (2018-06-27 10:10:32)
> > Although snd_hda_power_up() and snd_hda_power_up_pm() may fail, we
> > haven't dealt with the error properly in many places.  It's an unusual
> > situation but still possible.
> > 
> > This patch spots these places and adds the proper error paths.
> > 
> > Signed-off-by: Takashi Iwai <tiwai at suse.de>
> 
> Verdict from CI,
> 
> https://intel-gfx-ci.01.org/tree/drm-tip/Trybot_2430/issues.html
> 
> is that this one causes a bunch of pm fallout.
> 
> Do you mind doing a quick revert? Or working with our CI to find the bad
> chunk?

Hrm, it doesn't look good -- I revert the branch merge now.
Thanks for the quick heads up.


Takashi


> 
> On a second look,
> 
> > @@ -7310,7 +7339,8 @@ static void ca0132_free(struct hda_codec *codec)
> >         struct ca0132_spec *spec = codec->spec;
> >  
> >         cancel_delayed_work_sync(&spec->unsol_hp_work);
> > -       snd_hda_power_up(codec);
> > +       if (snd_hda_power_up(codec) < 0)
> > +               goto skip_shutdown;
> >         switch (spec->quirk) {
> >         case QUIRK_SBZ:
> >                 sbz_exit_chip(codec);
> > @@ -7326,6 +7356,7 @@ static void ca0132_free(struct hda_codec *codec)
> >                 break;
> >         }
> >         snd_hda_power_down(codec);
> > + skip_shutdown:
> >         if (spec->mem_base)
> >                 iounmap(spec->mem_base);
> >         kfree(spec->spec_init_verbs);
> 
> would seem to be the only chunk more complicated than the rest.
> -Chris
> 


More information about the Alsa-devel mailing list