aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Greer <mgreer@animalcreek.com>2015-08-19 11:58:52 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2015-08-19 13:17:45 -0400
commitaaee24accb9e374c04eb9672d5324160626462c5 (patch)
tree30aabd85457fe9a9c9e71fb1dc8dae82394064ec
parentae291f79da57ef4cb747ae1940b37152d1a4e5cf (diff)
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>
-rw-r--r--drivers/nfc/trf7970a.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index 08f23d75700e..70b0707fd9a9 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -629,7 +629,9 @@ static void trf7970a_send_upstream(struct trf7970a *trf)
629 } 629 }
630 630
631 if (trf->adjust_resp_len) { 631 if (trf->adjust_resp_len) {
632 skb_trim(trf->rx_skb, trf->rx_skb->len - 1); 632 if (trf->rx_skb)
633 skb_trim(trf->rx_skb, trf->rx_skb->len - 1);
634
633 trf->adjust_resp_len = false; 635 trf->adjust_resp_len = false;
634 } 636 }
635 637