summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-10-14 16:17:14 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2007-10-14 16:17:14 +0200
commit49608ea6dc6665c2b8f00a01dafc606ebb299b04 (patch)
treed88cef5bfd687c1428c0f069d245dd3d9a23b1b0 /linux/drivers/media/video
parent9fb41294803cc92d962f16d61619bd8d19fd0697 (diff)
downloadmediapointer-dvb-s2-49608ea6dc6665c2b8f00a01dafc606ebb299b04.tar.gz
mediapointer-dvb-s2-49608ea6dc6665c2b8f00a01dafc606ebb299b04.tar.bz2
ivtvfb: check return value of unregister_framebuffer.
From: Hans Verkuil <hverkuil@xs4all.nl> Prevent unloading the framebuffer if it is still in use. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/ivtv/ivtvfb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtvfb.c b/linux/drivers/media/video/ivtv/ivtvfb.c
index 0abca6bec..4a7512d90 100644
--- a/linux/drivers/media/video/ivtv/ivtvfb.c
+++ b/linux/drivers/media/video/ivtv/ivtvfb.c
@@ -1169,9 +1169,12 @@ static void ivtvfb_cleanup(void)
for (i = 0; i < ivtv_cards_active; i++) {
itv = ivtv_cards[i];
if (itv && (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) && itv->osd_info) {
+ if (unregister_framebuffer(&itv->osd_info->ivtvfb_info)) {
+ IVTVFB_WARN("Framebuffer %d is in use, cannot unload\n", i);
+ return;
+ }
IVTVFB_DEBUG_INFO("Unregister framebuffer %d\n", i);
ivtvfb_blank(FB_BLANK_POWERDOWN, &itv->osd_info->ivtvfb_info);
- unregister_framebuffer(&itv->osd_info->ivtvfb_info);
ivtvfb_release_buffers(itv);
itv->osd_video_pbase = 0;
}