[PATCH net-next 10/10] net: wan: remove unnecessary out of memory message

From: Guangbin Huang
Date: Wed May 26 2021 - 07:49:02 EST


From: Peng Li <lipeng321@xxxxxxxxxx>

This patch removes unnecessary out of memory message,
to fix the following checkpatch.pl warning:
"WARNING: Possible unnecessary 'out of memory' message"

Signed-off-by: Peng Li <lipeng321@xxxxxxxxxx>
Signed-off-by: Guangbin Huang <huangguangbin2@xxxxxxxxxx>
---
drivers/net/wan/hdlc_fr.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c
index de7fbdc77588..72250fe0a1df 100644
--- a/drivers/net/wan/hdlc_fr.c
+++ b/drivers/net/wan/hdlc_fr.c
@@ -474,10 +474,9 @@ static void fr_lmi_send(struct net_device *dev, int fullrep)
}

skb = dev_alloc_skb(len);
- if (!skb) {
- netdev_warn(dev, "Memory squeeze on fr_lmi_send()\n");
+ if (!skb)
return;
- }
+
memset(skb->data, 0, len);
skb_reserve(skb, 4);
if (lmi == LMI_CISCO)
--
2.8.1