projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
NFC: nxp-nci: Don't issue a zero length i2c_master_read()
[platform/kernel/linux-starfive.git]
/
drivers
/
nfc
/
nxp-nci
/
i2c.c
diff --git
a/drivers/nfc/nxp-nci/i2c.c
b/drivers/nfc/nxp-nci/i2c.c
index
7e451c1
..
e8f3b35
100644
(file)
--- a/
drivers/nfc/nxp-nci/i2c.c
+++ b/
drivers/nfc/nxp-nci/i2c.c
@@
-162,6
+162,9
@@
static int nxp_nci_i2c_nci_read(struct nxp_nci_i2c_phy *phy,
skb_put_data(*skb, (void *)&header, NCI_CTRL_HDR_SIZE);
+ if (!header.plen)
+ return 0;
+
r = i2c_master_recv(client, skb_put(*skb, header.plen), header.plen);
if (r != header.plen) {
nfc_err(&client->dev,