Re: [PATCHv2] ALSA: Support Media Vision Jazz16 chips

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 14, 2007 at 03:41:01AM +0200, Rene Herman wrote:
> On 04/12/2007 08:22 PM, Rask Ingemann Lambertsen wrote:
> 
> >+	static uint dev_num = 0;
> >+
> >+	if (enable[dev_num])
> >+		card = snd_card_new(index[dev_num], id[dev_num], 
> >THIS_MODULE, 0);
> >+	else
> >+		card = NULL;
> >+	dev_num++;
> >+	if (card == NULL)
> >+		return enable[dev_num] ? -ENOMEM : -ENODEV;
> 
> You should also guard against dev_num overrunning SNDRV_CARDS. How about:

   Oops. Also notice dev_num++ between two checks of what was supposed to be
the same enable[dev_num]. :-(

   I fixed the other bits as well. I'll post a new patch in a few days.

-- 
Rask Ingemann Lambertsen
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux