summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhengchao Shao <shaozhengchao@huawei.com>2023-11-23 09:55:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-05 20:14:38 +0000
commitc9ac947693f57e3d54f6758425f0e60d422a29b1 (patch)
treed81ced48d27448058a710ac262760cdd875967a8
parent4caf548176506338cf863cb01bd521c459ee41bd (diff)
downloadlinux-stable-c9ac947693f57e3d54f6758425f0e60d422a29b1.tar.gz
linux-stable-c9ac947693f57e3d54f6758425f0e60d422a29b1.tar.bz2
linux-stable-c9ac947693f57e3d54f6758425f0e60d422a29b1.zip
bonding: remove print in bond_verify_device_path
commit 486058f42a4728053ae69ebbf78e9731d8ce6f8b 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>
-rw-r--r--drivers/net/bonding/bond_main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 9c1652886f4e..8e6cc0e133b7 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2973,11 +2973,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 = BOND_VLAN_PROTO_NONE;
return tags;
}