ALSA: als300: Fix missing chip initialization
authorTakashi Iwai <tiwai@suse.de>
Tue, 20 Jul 2021 22:18:18 +0000 (00:18 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 Jul 2021 22:31:56 +0000 (00:31 +0200)
The recent code refactoring missed the initialization of the chip
variable as its allocation was moved to card->private_data.
Let's fix it.

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

index 9c94072..b86565d 100644 (file)
@@ -702,6 +702,7 @@ static int snd_als300_probe(struct pci_dev *pci,
                                sizeof(*chip), &card);
        if (err < 0)
                return err;
+       chip = card->private_data;
 
        chip_type = pci_id->driver_data;