]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers:misc: ti-st: fix potential NULL pointer dereference in st_register()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 8 Oct 2012 02:44:47 +0000 (10:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 22:52:29 +0000 (15:52 -0700)
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>
drivers/misc/ti-st/st_core.c

index 46937b107261df5fddeb39c6dd16d491e898833e..b90a2241d79c41cab2b551736cc9e2a56315a7b3 100644 (file)
@@ -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");