From: Dan Carpenter <error27@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>
Cc: "Bruno Prémont" <bonbons@linux-vserver.org>,
"Jaya Kumar" <jayakumar.lkml@gmail.com>,
linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] hid: picolcd: testing the wrong variable
Date: Fri, 6 Aug 2010 08:28:49 +0200 [thread overview]
Message-ID: <20100806062848.GL9031@bicker> (raw)
"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);
next reply other threads:[~2010-08-06 6:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 6:28 Dan Carpenter [this message]
2010-08-06 8:08 ` [patch] hid: picolcd: testing the wrong variable Bruno Prémont
2010-08-06 12:54 ` Jiri Kosina
2010-08-06 12:53 ` Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100806062848.GL9031@bicker \
--to=error27@gmail.com \
--cc=bonbons@linux-vserver.org \
--cc=jayakumar.lkml@gmail.com \
--cc=jkosina@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).