Skip to content

Commit

Permalink
drivers:misc: ti-st: fix potential NULL pointer dereference in st_reg…
Browse files Browse the repository at this point in the history
…ister()

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@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent 1b3c165 commit 35299f8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/misc/ti-st/st_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 35299f8

Please sign in to comment.