summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Li <lipeng321@huawei.com>2021-06-04 10:32:08 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-05 00:34:17 +0300
commit579ebffe797368b47b7e677fba2ecfc108ae154b (patch)
tree10fed7674a6cc3fbc9803ce50338c3c646412ddd
parent1c906e369815c9f35628c492a13e33e6ccbe0e4b (diff)
downloadlinux-579ebffe797368b47b7e677fba2ecfc108ae154b.tar.xz
net: hdlc_x25: remove unnecessary out of memory message
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@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/wan/hdlc_x25.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
index 86b88f2a7028..525eb424fade 100644
--- a/drivers/net/wan/hdlc_x25.c
+++ b/drivers/net/wan/hdlc_x25.c
@@ -56,10 +56,8 @@ static void x25_connect_disconnect(struct net_device *dev, int reason, int code)
unsigned char *ptr;
skb = __dev_alloc_skb(1, GFP_ATOMIC | __GFP_NOMEMALLOC);
- if (!skb) {
- netdev_err(dev, "out of memory\n");
+ if (!skb)
return;
- }
ptr = skb_put(skb, 1);
*ptr = code;