diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-10-14 10:17:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-22 10:01:47 -0400 |
commit | d343d7f9792ac1790757cb35a419b8b0b5210917 (patch) | |
tree | 11145d4438edd9dc5044fcae963fe28f8fafdc7f /drivers/media | |
parent | 18e16f9c954c6a931ee97584014c826255e0bdaa (diff) |
V4L/DVB (6343): ivtvfb: check return value of unregister_framebuffer
Prevent unloading the framebuffer if it is still in use.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/ivtv/ivtvfb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index 0abca6bec7d4..4a7512d90bc9 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c | |||
@@ -1169,9 +1169,12 @@ static void ivtvfb_cleanup(void) | |||
1169 | for (i = 0; i < ivtv_cards_active; i++) { | 1169 | for (i = 0; i < ivtv_cards_active; i++) { |
1170 | itv = ivtv_cards[i]; | 1170 | itv = ivtv_cards[i]; |
1171 | if (itv && (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) && itv->osd_info) { | 1171 | if (itv && (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) && itv->osd_info) { |
1172 | if (unregister_framebuffer(&itv->osd_info->ivtvfb_info)) { | ||
1173 | IVTVFB_WARN("Framebuffer %d is in use, cannot unload\n", i); | ||
1174 | return; | ||
1175 | } | ||
1172 | IVTVFB_DEBUG_INFO("Unregister framebuffer %d\n", i); | 1176 | IVTVFB_DEBUG_INFO("Unregister framebuffer %d\n", i); |
1173 | ivtvfb_blank(FB_BLANK_POWERDOWN, &itv->osd_info->ivtvfb_info); | 1177 | ivtvfb_blank(FB_BLANK_POWERDOWN, &itv->osd_info->ivtvfb_info); |
1174 | unregister_framebuffer(&itv->osd_info->ivtvfb_info); | ||
1175 | ivtvfb_release_buffers(itv); | 1178 | ivtvfb_release_buffers(itv); |
1176 | itv->osd_video_pbase = 0; | 1179 | itv->osd_video_pbase = 0; |
1177 | } | 1180 | } |