提交 459e794b 编写于 作者: C Christophe Ricard 提交者: Samuel Ortiz

NFC: st21nfca: ERR_PTR vs NULL fix

"skb" can be NULL here but it can't be an ERR_PTR:
- IS_ERR(NULL) return false and skb migth be NULL.
- skb cannot be a ERR_PTR as nfc_hci_send_cmd_async it never using such cast.

!skb is more appropriate at those places.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 bc6b8275
......@@ -443,7 +443,7 @@ static void st21nfca_im_recv_atr_res_cb(void *context, struct sk_buff *skb,
if (err != 0)
return;
if (IS_ERR(skb))
if (!skb)
return;
switch (info->async_cb_type) {
......@@ -555,7 +555,7 @@ static void st21nfca_im_recv_dep_res_cb(void *context, struct sk_buff *skb,
if (err != 0)
return;
if (IS_ERR(skb))
if (!skb)
return;
switch (info->async_cb_type) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册