提交 a1060250 编写于 作者: D Dan Carpenter 提交者: Jiri Kosina

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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 3cfc2c42
...@@ -547,7 +547,7 @@ static void picolcd_fb_destroy(struct fb_info *info) ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册