bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk
[linux-2.6-microblaze.git] / drivers / net / bonding / bond_main.c
index 4e0600c..d987432 100644 (file)
@@ -2973,8 +2973,11 @@ 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)
+               if (!tags) {
+                       net_err_ratelimited("%s: %s: Failed to allocate tags\n",
+                                           __func__, start_dev->name);
                        return ERR_PTR(-ENOMEM);
+               }
                tags[level].vlan_proto = BOND_VLAN_PROTO_NONE;
                return tags;
        }