[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd-P2iYGkFovRD82jyM-m8bUi4+cxOh1cSwbK2nJp9T_Ow@mail.gmail.com>
Date: Mon, 8 Oct 2012 10:44:47 +0800
From: Wei Yongjun <weiyj.lk@...il.com>
To: gregkh@...uxfoundation.org
Cc: yongjun_wei@...ndmicro.com.cn, linux-kernel@...r.kernel.org
Subject: [PATCH v2] drivers:misc: ti-st: fix potential NULL pointer
dereference in st_register()
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
Remove the pointless NULL dereference above the NULL test.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
v1 -> v2: drop the NULL dereference
---
drivers/misc/ti-st/st_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c
index 46937b1..b90a224 100644
--- a/drivers/misc/ti-st/st_core.c
+++ b/drivers/misc/ti-st/st_core.c
@@ -511,7 +511,6 @@ long st_register(struct st_proto_s *new_proto)
unsigned long flags = 0;
st_kim_ref(&st_gdata, 0);
- pr_info("%s(%d) ", __func__, new_proto->chnl_id);
if (st_gdata == NULL || new_proto == NULL || new_proto->recv == NULL
|| new_proto->reg_complete_cb == NULL) {
pr_err("gdata/new_proto/recv or reg_complete_cb not ready");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists