Message ID | 20240228074138.23679-1-soxiebing@163.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v1] ALSA: hda: optimize the probe codec process | expand |
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c index e5c53ad..e1ece0a 100644 --- a/sound/pci/hda/hda_controller.c +++ b/sound/pci/hda/hda_controller.c @@ -1474,6 +1474,9 @@ int azx_probe_codecs(struct azx *chip, unsigned int max_slots) dev_warn(chip->card->dev, "Codec #%d probe error; disabling it...\n", c); bus->codec_mask &= ~(1 << c); + /* no codecs */ + if (bus->codec_mask == 0) + break; /* More badly, accessing to a non-existing * codec often screws up the controller chip, * and disturbs the further communications.