diff options
| author | Brian Feldman <green@FreeBSD.org> | 2003-02-23 20:49:45 +0000 |
|---|---|---|
| committer | Brian Feldman <green@FreeBSD.org> | 2003-02-23 20:49:45 +0000 |
| commit | 3fbe138ca990305e45081ef9156ac450fefda66e (patch) | |
| tree | 1ebdc932a8e7f692bce8444099b720f0a06094a3 | |
| parent | 437ce69ead12ce1df735b89598cf416bbb4e207d (diff) | |
Notes
| -rw-r--r-- | sys/dev/sound/pcm/feeder.c | 2 | ||||
| -rw-r--r-- | sys/dev/sound/pcm/feeder_fmt.c | 12 | ||||
| -rw-r--r-- | sys/dev/sound/pcm/feeder_rate.c | 5 |
3 files changed, 8 insertions, 11 deletions
diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 91bdb66311cc..851957439a35 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -137,7 +137,7 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) struct pcm_feeder *f; int err; - f = (struct pcm_feeder *)kobj_create((kobj_class_t)fc, M_FEEDER, M_NOWAIT | M_ZERO); + f = (struct pcm_feeder *)kobj_create((kobj_class_t)fc, M_FEEDER, M_WAITOK | M_ZERO); if (f == NULL) return NULL; diff --git a/sys/dev/sound/pcm/feeder_fmt.c b/sys/dev/sound/pcm/feeder_fmt.c index b4fa4f3ff796..72de901318cc 100644 --- a/sys/dev/sound/pcm/feeder_fmt.c +++ b/sys/dev/sound/pcm/feeder_fmt.c @@ -209,8 +209,8 @@ FEEDER_DECLARE(feeder_8to16le, 0, NULL); static int feed_16to8_init(struct pcm_feeder *f) { - f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_NOWAIT | M_ZERO); - return (f->data)? 0 : ENOMEM; + f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_WAITOK | M_ZERO); + return 0; } static int @@ -318,8 +318,8 @@ FEEDER_DECLARE(feeder_monotostereo16, 0, NULL); static int feed_stereotomono8_init(struct pcm_feeder *f) { - f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_NOWAIT | M_ZERO); - return (f->data)? 0 : ENOMEM; + f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_WAITOK | M_ZERO); + return 0; } static int @@ -363,8 +363,8 @@ FEEDER_DECLARE(feeder_stereotomono8, 1, NULL); static int feed_stereotomono16_init(struct pcm_feeder *f) { - f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_NOWAIT | M_ZERO); - return (f->data)? 0 : ENOMEM; + f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_WAITOK | M_ZERO); + return 0; } static int diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index 92454c9bb4b6..4dfff2ef64c1 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -249,10 +249,7 @@ feed_rate_init(struct pcm_feeder *f) { struct feed_rate_info *info; - info = malloc(sizeof(*info), M_RATEFEEDER, M_NOWAIT | M_ZERO); - if (info == NULL) - return ENOMEM; - + info = malloc(sizeof(*info), M_RATEFEEDER, M_WAITOK | M_ZERO); info->src = DSP_DEFAULT_SPEED; info->dst = DSP_DEFAULT_SPEED; info->channels = 2; |
