]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bonding: remove print in bond_verify_device_path
authorZhengchao Shao <shaozhengchao@huawei.com>
Thu, 23 Nov 2023 01:55:15 +0000 (09:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Nov 2023 15:21:32 +0000 (15:21 +0000)
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>
drivers/net/bonding/bond_main.c

index d987432cee3b1f5cf4a3972e0d1fbc7d264cd807..4e0600c7b050f21c82a8862e224bb055e95d5039 100644 (file)
@@ -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;
        }