summaryrefslogtreecommitdiffstats
path: root/net/nfc/nci/spi.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--net/nfc/nci/spi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/nfc/nci/spi.c b/net/nfc/nci/spi.c
index 452f4c16b..d2de7fc22 100644
--- a/net/nfc/nci/spi.c
+++ b/net/nfc/nci/spi.c
@@ -163,6 +163,8 @@ static int send_acknowledge(struct nci_spi *nspi, u8 acknowledge)
int ret;
skb = nci_skb_alloc(nspi->ndev, 0, GFP_KERNEL);
+ if (!skb)
+ return -ENOMEM;
/* add the NCI SPI header to the start of the buffer */
hdr = skb_push(skb, NCI_SPI_HDR_LEN);