0001-sound-pcm-we-can-wait-when-mallocing-in-feed_rate_in.patch

rumcic, 01/28/2011 11:46 PM

Download (1.25 KB)

View differences:

sys/dev/sound/pcm/feeder_rate.c
509 509
{
510 510
	struct feed_rate_info *info;
511 511

  
512
	info = kmalloc(sizeof(*info), M_RATEFEEDER, M_NOWAIT | M_ZERO);
512
	info = kmalloc(sizeof(*info), M_RATEFEEDER, M_WAITOK | M_ZERO);
513 513
	if (info == NULL)
514 514
		return ENOMEM;
515 515
	/*
......
517 517
	 */
518 518
	info->bufsz = 2 + feeder_rate_buffersize;
519 519
	info->buffer = kmalloc(sizeof(*info->buffer) * info->bufsz,
520
					M_RATEFEEDER, M_NOWAIT | M_ZERO);
520
					M_RATEFEEDER, M_WAITOK | M_ZERO);
521 521
	if (info->buffer == NULL) {
522 522
		kfree(info, M_RATEFEEDER);
523 523
		return ENOMEM;
524
-