Commit 459e794b authored by Christophe Ricard's avatar Christophe Ricard Committed by 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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment