diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-05-01 09:31:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-05-14 01:54:09 -0400 |
commit | 3f98387efa9333c5765d36e144c47c107d6ba64a (patch) | |
tree | b5c8f515aecf306b0e0b6087458d221d9411f6cb /drivers/media/video/ivtv/ivtvfb.c | |
parent | 6a4a79355bfa9ae6977556595a68f2e3a0e143f7 (diff) |
V4L/DVB (7854): cx18/ivtv: improve and fix out-of-memory handling
- 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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtvfb.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtvfb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index df789f683e63..73be154f7f05 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c | |||
@@ -948,7 +948,8 @@ static int ivtvfb_init_vidmode(struct ivtv *itv) | |||
948 | } | 948 | } |
949 | 949 | ||
950 | /* Allocate the pseudo palette */ | 950 | /* Allocate the pseudo palette */ |
951 | oi->ivtvfb_info.pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL); | 951 | oi->ivtvfb_info.pseudo_palette = |
952 | kmalloc(sizeof(u32) * 16, GFP_KERNEL|__GFP_NOWARN); | ||
952 | 953 | ||
953 | if (!oi->ivtvfb_info.pseudo_palette) { | 954 | if (!oi->ivtvfb_info.pseudo_palette) { |
954 | IVTVFB_ERR("abort, unable to alloc pseudo pallete\n"); | 955 | IVTVFB_ERR("abort, unable to alloc pseudo pallete\n"); |
@@ -1056,7 +1057,8 @@ static int ivtvfb_init_card(struct ivtv *itv) | |||
1056 | return -EBUSY; | 1057 | return -EBUSY; |
1057 | } | 1058 | } |
1058 | 1059 | ||
1059 | itv->osd_info = kzalloc(sizeof(struct osd_info), GFP_ATOMIC); | 1060 | itv->osd_info = kzalloc(sizeof(struct osd_info), |
1061 | GFP_ATOMIC|__GFP_NOWARN); | ||
1060 | if (itv->osd_info == NULL) { | 1062 | if (itv->osd_info == NULL) { |
1061 | IVTVFB_ERR("Failed to allocate memory for osd_info\n"); | 1063 | IVTVFB_ERR("Failed to allocate memory for osd_info\n"); |
1062 | return -ENOMEM; | 1064 | return -ENOMEM; |