Skip to content

Commit

Permalink
HID: picolcd: testing the wrong variable
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Dan Carpenter authored and Jiri Kosina committed Aug 6, 2010
1 parent 3cfc2c4 commit a106025
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hid/hid-picolcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a106025

Please sign in to comment.