From: Bruno Prémont Date: Fri, 6 Aug 2010 08:08:04 +0000 (+0200) Subject: HID: picolcd: correct ordering of framebuffer freeing X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1778ca298b06ec86af5fc9603447c379cbfb477b;p=linux-beck.git HID: picolcd: correct ordering of framebuffer freeing Fix the free() ordering (which was never reached due to wrong check). Signed-off-by: Bruno Prémont Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c index c0bdebac5672..bc2e07740628 100644 --- a/drivers/hid/hid-picolcd.c +++ b/drivers/hid/hid-picolcd.c @@ -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); } }