Преглед изворни кода

HID: picolcd: testing the wrong variable

"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>
Dan Carpenter пре 15 година
родитељ
комит
a106025015
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      drivers/hid/hid-picolcd.c

+ 1 - 1
drivers/hid/hid-picolcd.c

@@ -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);