diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-05-01 12:31:12 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-05-01 12:31:12 +0200 |
commit | ea036ab76194bc4f02dbb0803e4d977044636188 (patch) | |
tree | 1902d1b83ee3a302c5fdfec4de2ae8e2d1506ac8 /linux/drivers/media/video/cx18/cx18-queue.c | |
parent | 778ea1f1dd0cb7da18e5e0258f9c443f8debafe4 (diff) | |
download | mediapointer-dvb-s2-ea036ab76194bc4f02dbb0803e4d977044636188.tar.gz mediapointer-dvb-s2-ea036ab76194bc4f02dbb0803e4d977044636188.tar.bz2 |
cx18/ivtv: improve and fix out-of-memory handling
From: Hans Verkuil <hverkuil@xs4all.nl>
- don't show kernel backtrace when the allocation of the buffers fails: the
normal ivtv/cx18 messages are clear enough and the backtrace scares users.
- fix cleanup after the buffer allocation fails (caused kernel panic).
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/cx18/cx18-queue.c')
-rw-r--r-- | linux/drivers/media/video/cx18/cx18-queue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/video/cx18/cx18-queue.c b/linux/drivers/media/video/cx18/cx18-queue.c index 65af1bb50..4ef6996b2 100644 --- a/linux/drivers/media/video/cx18/cx18-queue.c +++ b/linux/drivers/media/video/cx18/cx18-queue.c @@ -239,12 +239,12 @@ int cx18_stream_alloc(struct cx18_stream *s) /* allocate stream buffers. Initially all buffers are in q_free. */ for (i = 0; i < s->buffers; i++) { - struct cx18_buffer *buf = - kzalloc(sizeof(struct cx18_buffer), GFP_KERNEL); + struct cx18_buffer *buf = kzalloc(sizeof(struct cx18_buffer), + GFP_KERNEL|__GFP_NOWARN); if (buf == NULL) break; - buf->buf = kmalloc(s->buf_size, GFP_KERNEL); + buf->buf = kmalloc(s->buf_size, GFP_KERNEL|__GFP_NOWARN); if (buf->buf == NULL) { kfree(buf); break; |