[PATCH V2 net-next 10/10] net: hdlc_fr: remove unnecessary out of memory message
From: Guangbin Huang
Date: Thu May 27 2021 - 20:16:37 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 de7fbdc..72250fe 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