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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Christophe Ricard 2014-09-13 10:28:52 +02:00 committed by Samuel Ortiz
parent bc6b827592
commit 459e794b9b
1 changed files with 2 additions and 2 deletions

View File

@ -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) {