Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109304425
D46845.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D46845.diff
View Options
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -1296,12 +1296,7 @@
*/
if (c->direction == PCMDIR_PLAY) {
bs->sl = sndbuf_getmaxsize(bs);
- bs->shadbuf = malloc(bs->sl, M_DEVBUF, M_NOWAIT);
- if (bs->shadbuf == NULL) {
- device_printf(d->dev, "%s(): failed to create shadow "
- "buffer\n", __func__);
- goto fail;
- }
+ bs->shadbuf = malloc(bs->sl, M_DEVBUF, M_WAITOK);
}
PCM_LOCK(d);
diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c
--- a/sys/dev/sound/pcm/feeder.c
+++ b/sys/dev/sound/pcm/feeder.c
@@ -62,11 +62,7 @@
KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name));
SLIST_INIT(&feedertab);
- fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO);
- if (fte == NULL) {
- printf("can't allocate memory for root feeder: %s\n", fc->name);
- return;
- }
+ fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO);
fte->feederclass = fc;
fte->desc = NULL;
fte->idx = feedercnt;
@@ -92,13 +88,7 @@
*/
i = 0;
while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) {
- fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO);
- if (fte == NULL) {
- printf("can't allocate memory for feeder '%s', "
- "%x -> %x\n",
- fc->name, fc->desc[i].in, fc->desc[i].out);
- return;
- }
+ fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO);
fte->feederclass = fc;
fte->desc = &fc->desc[i];
fte->idx = feedercnt;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 4, 7:53 AM (20 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16445181
Default Alt Text
D46845.diff (1 KB)
Attached To
Mode
D46845: sound: Use M_WAITOK where possible
Attached
Detach File
Event Timeline
Log In to Comment