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 <[email protected]>
Signed-off-by: Mark Greer <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
Mark Greer 2015-08-19 08:58:52 -07:00 • committed by Samuel Ortiz
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;
}