bonding: remove print in bond_verify_device_path

commit 486058f42a upstream.

As suggested by Paolo in link[1], if the memory allocation fails, the mm
layer will emit a lot warning comprising the backtrace, so remove the
print.

[1] https://lore.kernel.org/all/20231118081653.1481260-1-shaozhengchao@huawei.com/

Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Zhengchao Shao 2023-11-23 09:55:15 +08:00 committed by Greg Kroah-Hartman
parent e1edd8e6c0
commit 2386ee6cba
1 changed files with 1 additions and 4 deletions

View File

@ -2943,11 +2943,8 @@ struct bond_vlan_tag *bond_verify_device_path(struct net_device *start_dev,
if (start_dev == end_dev) {
tags = kcalloc(level + 1, sizeof(*tags), GFP_ATOMIC);
if (!tags) {
net_err_ratelimited("%s: %s: Failed to allocate tags\n",
__func__, start_dev->name);
if (!tags)
return ERR_PTR(-ENOMEM);
}
tags[level].vlan_proto = VLAN_N_VID;
return tags;
}