提交 c3c4ed65 编写于 作者: A Alexey Dobriyan 提交者: David S. Miller

[ROSE]: do proto_unregister() on exit paths

Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1f26dac3
......@@ -1481,12 +1481,14 @@ static int __init rose_proto_init(void)
if (rose_ndevs > 0x7FFFFFFF/sizeof(struct net_device *)) {
printk(KERN_ERR "ROSE: rose_proto_init - rose_ndevs parameter to large\n");
proto_unregister(&rose_proto);
return -1;
}
dev_rose = kmalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL);
if (dev_rose == NULL) {
printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n");
proto_unregister(&rose_proto);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册