NFC: trf7970a: Add NULL check to clear up smatch warning

Although it should be unnecessary, add a NULL pointer check
to trf7970a_send_upstream() to eliminate a smatch warning.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Mark Greer 2015-08-19 08:58:52 -07:00 committed by Samuel Ortiz
parent ae291f79da
commit aaee24accb

View File

@ -629,7 +629,9 @@ static void trf7970a_send_upstream(struct trf7970a *trf)
}
if (trf->adjust_resp_len) {
skb_trim(trf->rx_skb, trf->rx_skb->len - 1);
if (trf->rx_skb)
skb_trim(trf->rx_skb, trf->rx_skb->len - 1);
trf->adjust_resp_len = false;
}