aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/nci/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nfc/nci/spi.c')
-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 9dd8a1096916..96f071792a04 100644
--- a/net/nfc/nci/spi.c
+++ b/net/nfc/nci/spi.c
@@ -150,6 +150,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);