hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/sound/pci/ac97/ac97_codec.c
....@@ -2007,10 +2007,9 @@
20072007 .dev_disconnect = snd_ac97_dev_disconnect,
20082008 };
20092009
2010
- if (rac97)
2011
- *rac97 = NULL;
2012
- if (snd_BUG_ON(!bus || !template))
2010
+ if (snd_BUG_ON(!bus || !template || !rac97))
20132011 return -EINVAL;
2012
+ *rac97 = NULL;
20142013 if (snd_BUG_ON(template->num >= 4))
20152014 return -EINVAL;
20162015 if (bus->codec[template->num])