net: hdlc_x25: remove unnecessary out of memory message
authorPeng Li <lipeng321@huawei.com>
Fri, 4 Jun 2021 07:32:08 +0000 (15:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Jun 2021 21:34:17 +0000 (14:34 -0700)
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>
drivers/net/wan/hdlc_x25.c

index 86b88f2..525eb42 100644 (file)
@@ -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;