net: lapbether: 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>
This commit is contained in:
@@ -266,10 +266,8 @@ static void lapbeth_connected(struct net_device *dev, int reason)
|
|||||||
unsigned char *ptr;
|
unsigned char *ptr;
|
||||||
struct sk_buff *skb = __dev_alloc_skb(1, GFP_ATOMIC | __GFP_NOMEMALLOC);
|
struct sk_buff *skb = __dev_alloc_skb(1, GFP_ATOMIC | __GFP_NOMEMALLOC);
|
||||||
|
|
||||||
if (!skb) {
|
if (!skb)
|
||||||
pr_err("out of memory\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
ptr = skb_put(skb, 1);
|
ptr = skb_put(skb, 1);
|
||||||
*ptr = X25_IFACE_CONNECT;
|
*ptr = X25_IFACE_CONNECT;
|
||||||
@@ -286,10 +284,8 @@ static void lapbeth_disconnected(struct net_device *dev, int reason)
|
|||||||
unsigned char *ptr;
|
unsigned char *ptr;
|
||||||
struct sk_buff *skb = __dev_alloc_skb(1, GFP_ATOMIC | __GFP_NOMEMALLOC);
|
struct sk_buff *skb = __dev_alloc_skb(1, GFP_ATOMIC | __GFP_NOMEMALLOC);
|
||||||
|
|
||||||
if (!skb) {
|
if (!skb)
|
||||||
pr_err("out of memory\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
ptr = skb_put(skb, 1);
|
ptr = skb_put(skb, 1);
|
||||||
*ptr = X25_IFACE_DISCONNECT;
|
*ptr = X25_IFACE_DISCONNECT;
|
||||||
|
|||||||
Reference in New Issue
Block a user