]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ALSA: cs4281: Fix missing chip initialization
authorTakashi Iwai <tiwai@suse.de>
Tue, 20 Jul 2021 22:17:20 +0000 (00:17 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 Jul 2021 22:31:39 +0000 (00:31 +0200)
The chip variable was forgotten to be initialized properly while
changing the object creation from the own malloc to
card->private_data.  This patch fixes it.

Fixes: 99041fea70d0 ("ALSA: cs4281: Allocate resources with device-managed APIs")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/s5him14ocjz.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/cs4281.c

index f338caf98354b598eea101ebdecd219751ed06c4..e7367402b84a34ff1d79cb41d5fecd78ceb10a14 100644 (file)
@@ -1288,7 +1288,7 @@ static int snd_cs4281_create(struct snd_card *card,
                             struct pci_dev *pci,
                             int dual_codec)
 {
-       struct cs4281 *chip;
+       struct cs4281 *chip = card->private_data;
        int err;
 
        err = pcim_enable_device(pci);