Added a fix for hardware dependence bug where a sound card failure
should not result in reading beyond array memory index.
Signed-off-by: Asim Kadav <kadav@cs.wisc.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
{
char temp[100];
+ if (pas_model < 0 ||
+ pas_model >= ARRAY_SIZE(pas_model_names)) {
+ printk(KERN_ERR "pas2 unrecognized model.\n");
+ return;
+ }
sprintf(temp,
"%s rev %d", pas_model_names[(int) pas_model],
pas_read(0x2789));