linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] hid: picolcd: testing the wrong variable
@ 2010-08-06  6:28 Dan Carpenter
  2010-08-06  8:08 ` Bruno Prémont
  2010-08-06 12:53 ` Jiri Kosina
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-08-06  6:28 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Bruno Prémont, Jaya Kumar, linux-input, kernel-janitors

"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>

diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c
index 346f0e3..c0bdeba 100644
--- a/drivers/hid/hid-picolcd.c
+++ b/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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-06 12:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-06  6:28 [patch] hid: picolcd: testing the wrong variable Dan Carpenter
2010-08-06  8:08 ` Bruno Prémont
2010-08-06 12:54   ` Jiri Kosina
2010-08-06 12:53 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).