diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2005-09-27 18:42:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-27 18:42:58 -0400 |
commit | c3c4ed652e8f2c348ebdd3f2e45664a0e238ee52 (patch) | |
tree | ec5633fcc20280857b850937645467bb618bfd4d /net | |
parent | 1f26dac32057baaf67d10b45c6b5277db862911d (diff) |
[ROSE]: do proto_unregister() on exit paths
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/rose/af_rose.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 5acb1680524a..a190eaee702e 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -1481,12 +1481,14 @@ static int __init rose_proto_init(void) | |||
1481 | 1481 | ||
1482 | if (rose_ndevs > 0x7FFFFFFF/sizeof(struct net_device *)) { | 1482 | if (rose_ndevs > 0x7FFFFFFF/sizeof(struct net_device *)) { |
1483 | printk(KERN_ERR "ROSE: rose_proto_init - rose_ndevs parameter to large\n"); | 1483 | printk(KERN_ERR "ROSE: rose_proto_init - rose_ndevs parameter to large\n"); |
1484 | proto_unregister(&rose_proto); | ||
1484 | return -1; | 1485 | return -1; |
1485 | } | 1486 | } |
1486 | 1487 | ||
1487 | dev_rose = kmalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL); | 1488 | dev_rose = kmalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL); |
1488 | if (dev_rose == NULL) { | 1489 | if (dev_rose == NULL) { |
1489 | printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n"); | 1490 | printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n"); |
1491 | proto_unregister(&rose_proto); | ||
1490 | return -1; | 1492 | return -1; |
1491 | } | 1493 | } |
1492 | 1494 | ||