Project

General

Profile

Bug #1974 ยป 0001-sound-pcm-we-can-wait-when-mallocing-in-feed_rate_in.patch

rumcic, 01/28/2011 11:46 PM

View differences:

sys/dev/sound/pcm/feeder_rate.c
{
struct feed_rate_info *info;
info = kmalloc(sizeof(*info), M_RATEFEEDER, M_NOWAIT | M_ZERO);
info = kmalloc(sizeof(*info), M_RATEFEEDER, M_WAITOK | M_ZERO);
if (info == NULL)
return ENOMEM;
/*
......
*/
info->bufsz = 2 + feeder_rate_buffersize;
info->buffer = kmalloc(sizeof(*info->buffer) * info->bufsz,
M_RATEFEEDER, M_NOWAIT | M_ZERO);
M_RATEFEEDER, M_WAITOK | M_ZERO);
if (info->buffer == NULL) {
kfree(info, M_RATEFEEDER);
return ENOMEM;
    (1-1/1)