Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35299f88 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman
Browse files

drivers:misc: ti-st: fix potential NULL pointer dereference in st_register()

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1b3c1655
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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");