Merge tag 'auxbus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[sfrench/cifs-2.6.git] / sound / hda / ext / hdac_ext_controller.c
index 4d060d5b1db6dc7eabfd5d44c3ef965792925537..b0c0ef824d7d914f5748f01bed8616fb876f146f 100644 (file)
@@ -148,6 +148,8 @@ struct hdac_ext_link *snd_hdac_ext_bus_get_link(struct hdac_bus *bus,
                return NULL;
        if (bus->idx != bus_idx)
                return NULL;
+       if (addr < 0 || addr > 31)
+               return NULL;
 
        list_for_each_entry(hlink, &bus->hlink_list, list) {
                for (i = 0; i < HDA_MAX_CODECS; i++) {