Skip to content

Commit 486058f

Browse files
zhengchaoshaodavem330
authored andcommitted
bonding: remove print in bond_verify_device_path
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>
1 parent e7bed88 commit 486058f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2973,11 +2973,8 @@ struct bond_vlan_tag *bond_verify_device_path(struct net_device *start_dev,
29732973

29742974
if (start_dev == end_dev) {
29752975
tags = kcalloc(level + 1, sizeof(*tags), GFP_ATOMIC);
2976-
if (!tags) {
2977-
net_err_ratelimited("%s: %s: Failed to allocate tags\n",
2978-
__func__, start_dev->name);
2976+
if (!tags)
29792977
return ERR_PTR(-ENOMEM);
2980-
}
29812978
tags[level].vlan_proto = BOND_VLAN_PROTO_NONE;
29822979
return tags;
29832980
}

0 commit comments

Comments
 (0)