Commit a106025015c8d24af6518aba3ac19c4dc9098b7c

Authored by Dan Carpenter
Committed by Jiri Kosina
1 parent 3cfc2c42c1

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/hid/hid-picolcd.c
... ... @@ -547,7 +547,7 @@
547 547 ref_cnt--;
548 548 mutex_lock(&info->lock);
549 549 (*ref_cnt)--;
550   - may_release = !ref_cnt;
  550 + may_release = !*ref_cnt;
551 551 mutex_unlock(&info->lock);
552 552 if (may_release) {
553 553 framebuffer_release(info);