Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / net / tipc / zone.c
index f5b00ea..2803e1b 100644 (file)
 
 struct _zone *tipc_zone_create(u32 addr)
 {
-       struct _zone *z_ptr;
+       struct _zone *z_ptr = NULL;
        u32 z_num;
 
-       if (!tipc_addr_domain_valid(addr)) {
-               err("Zone creation failed, invalid domain 0x%x\n", addr);
+       if (!tipc_addr_domain_valid(addr))
                return NULL;
-       }
 
-       z_ptr = kzalloc(sizeof(*z_ptr), GFP_ATOMIC);
-       if (!z_ptr) {
-               warn("Zone creation failed, insufficient memory\n");
-               return NULL;
+       z_ptr = (struct _zone *)kmalloc(sizeof(*z_ptr), GFP_ATOMIC);
+       if (z_ptr != NULL) {
+               memset(z_ptr, 0, sizeof(*z_ptr));
+               z_num = tipc_zone(addr);
+               z_ptr->addr = tipc_addr(z_num, 0, 0);
+               tipc_net.zones[z_num] = z_ptr;
        }
-
-       z_num = tipc_zone(addr);
-       z_ptr->addr = tipc_addr(z_num, 0, 0);
-       tipc_net.zones[z_num] = z_ptr;
        return z_ptr;
 }