提交 aaee24ac 编写于 作者: M Mark Greer 提交者: Samuel Ortiz

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMark Greer <mgreer@animalcreek.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 ae291f79
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册