HID: picolcd: correct ordering of framebuffer freeing
authorBruno Prémont <bonbons@linux-vserver.org>
Fri, 6 Aug 2010 08:08:04 +0000 (10:08 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 6 Aug 2010 12:53:10 +0000 (14:53 +0200)
Fix the free() ordering (which was never reached due to wrong check).

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-picolcd.c

index c0bdebac5672512fe5195266a0ffd4070eb6b3a4..bc2e0774062864667ca92c52e3b4e7a23d923f53 100644 (file)
@@ -550,8 +550,8 @@ static void picolcd_fb_destroy(struct fb_info *info)
        may_release = !*ref_cnt;
        mutex_unlock(&info->lock);
        if (may_release) {
-               framebuffer_release(info);
                vfree((u8 *)info->fix.smem_start);
+               framebuffer_release(info);
        }
 }