Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d343d7f9792ac1790757cb35a419b8b0b5210917
Commit:     d343d7f9792ac1790757cb35a419b8b0b5210917
Parent:     18e16f9c954c6a931ee97584014c826255e0bdaa
Author:     Hans Verkuil <[EMAIL PROTECTED]>
AuthorDate: Sun Oct 14 11:17:14 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Mon Oct 22 12:01:47 2007 -0200

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 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 0abca6b..4a7512d 100644
--- a/drivers/media/video/ivtv/ivtvfb.c
+++ b/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;
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to