forked from Minki/linux
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:
parent
ae291f79da
commit
aaee24accb
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user