From: Krzysztof Kozlowski Date: Mon, 13 Sep 2021 13:20:35 +0000 (+0200) Subject: nfc: mrvl: drop unneeded memory allocation fail messages X-Git-Tag: block-5.16-2021-11-13~96^2~469^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d1c624ebaa5113e5e80f63d55c1ddc19324b3b66;p=linux-2.6-block.git nfc: mrvl: drop unneeded memory allocation fail messages nci_skb_alloc() already prints an error message on memory allocation failure. Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller --- diff --git a/drivers/nfc/nfcmrvl/fw_dnld.c b/drivers/nfc/nfcmrvl/fw_dnld.c index edac56b01fd1..e83f65596a88 100644 --- a/drivers/nfc/nfcmrvl/fw_dnld.c +++ b/drivers/nfc/nfcmrvl/fw_dnld.c @@ -76,10 +76,8 @@ static struct sk_buff *alloc_lc_skb(struct nfcmrvl_private *priv, uint8_t plen) struct nci_data_hdr *hdr; skb = nci_skb_alloc(priv->ndev, (NCI_DATA_HDR_SIZE + plen), GFP_KERNEL); - if (!skb) { - pr_err("no memory for data\n"); + if (!skb) return NULL; - } hdr = skb_put(skb, NCI_DATA_HDR_SIZE); hdr->conn_id = NCI_CORE_LC_CONNID_PROP_FW_DL;