]> git.hungrycats.org Git - linux/commitdiff
[ATM]: [clip] check return code from kmem_cache_create (by "Randy.Dunlap" <rddunlap...
authorChas Williams <chas@cmf.nrl.navy.mil>
Wed, 4 Feb 2004 15:20:26 +0000 (07:20 -0800)
committerDavid S. Miller <davem@nuts.davemloft.net>
Wed, 4 Feb 2004 15:20:26 +0000 (07:20 -0800)
net/atm/clip.c

index 4bbc6fccbc565e173a700e7000d2f327451cd81b..811e2f2bc444d2d40e03cb89f3182e7889101d7b 100644 (file)
@@ -1021,6 +1021,9 @@ static int __init atm_clip_init(void)
        clip_tbl.kmem_cachep = kmem_cache_create(clip_tbl.id,
            clip_tbl.entry_size, 0, SLAB_HWCACHE_ALIGN, NULL, NULL);
 
+       if (!clip_tbl.kmem_cachep)
+               return -ENOMEM;
+
        /* so neigh_ifdown() doesn't complain */
        clip_tbl.proxy_timer.data = 0;
        clip_tbl.proxy_timer.function = 0;