Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1060250 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jiri Kosina
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 3cfc2c42
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -547,7 +547,7 @@ static void picolcd_fb_destroy(struct fb_info *info)
	ref_cnt--;
	ref_cnt--;
	mutex_lock(&info->lock);
	mutex_lock(&info->lock);
	(*ref_cnt)--;
	(*ref_cnt)--;
	may_release = !ref_cnt;
	may_release = !*ref_cnt;
	mutex_unlock(&info->lock);
	mutex_unlock(&info->lock);
	if (may_release) {
	if (may_release) {
		framebuffer_release(info);
		framebuffer_release(info);