projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae291f7
)
NFC: trf7970a: Add NULL check to clear up smatch warning
author
Mark Greer
<
[email protected]
>
Wed, 19 Aug 2015 15:58:52 +0000
(08:58 -0700)
committer
Samuel Ortiz
<
[email protected]
>
Wed, 19 Aug 2015 17:17:45 +0000
(19:17 +0200)
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]
>
drivers/nfc/trf7970a.c
patch
|
blob
|
history
diff --git
a/drivers/nfc/trf7970a.c
b/drivers/nfc/trf7970a.c
index 08f23d75700e78f2627bca9914ee9d570a553bcb..70b0707fd9a98514b5785dbe3a6fc467f8206d07 100644
(file)
--- a/
drivers/nfc/trf7970a.c
+++ b/
drivers/nfc/trf7970a.c
@@
-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;
}