]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
HID: picolcd: testing the wrong variable
authorDan Carpenter <error27@gmail.com>
Fri, 6 Aug 2010 12:51:10 +0000 (14:51 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 6 Aug 2010 12:51:10 +0000 (14:51 +0200)
"ref_cnt" is a point to the reference count and it's non-null.  We really
want to test the reference count itself.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-picolcd.c

index 346f0e34987e68454dddd3393c2b24cc1f640729..c0bdebac5672512fe5195266a0ffd4070eb6b3a4 100644 (file)
@@ -547,7 +547,7 @@ static void picolcd_fb_destroy(struct fb_info *info)
        ref_cnt--;
        mutex_lock(&info->lock);
        (*ref_cnt)--;
-       may_release = !ref_cnt;
+       may_release = !*ref_cnt;
        mutex_unlock(&info->lock);
        if (may_release) {
                framebuffer_release(info);