• Takashi Iwai's avatar
    ALSA: hda - Fix Oops at codec reset/reconfig · 07dc59f0
    Takashi Iwai authored
    snd_hda_codec_reset() calls restore_pincfgs() where the codec is
    powered up again, which eventually tries to resume and initialize via
    the callbacks of the codec.  However, it's the place just after codec
    free callback, thus no codec callbacks should be called after that.
    On a codec like CS4206, it results in Oops due to the access in init
    callback.
    
    This patch fixes the issue by clearing the codec callbacks properly
    after freeing codec.
    Reported-by: default avatarDaniel J Blueman <daniel@quora.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    07dc59f0
hda_codec.c 138 KB