浏览代码

[DCCP]: Fix error handling in dccp_init

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Arnaldo Carvalho de Melo 19 年之前
父节点
当前提交
fa23e2ecd3
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      net/dccp/proto.c

+ 3 - 1
net/dccp/proto.c

@@ -799,6 +799,7 @@ static int __init dccp_init(void)
 	if (rc)
 		goto out;
 
+	rc = -ENOBUFS;
 	dccp_hashinfo.bind_bucket_cachep =
 		kmem_cache_create("dccp_bind_bucket",
 				  sizeof(struct inet_bind_bucket), 0,
@@ -866,7 +867,8 @@ static int __init dccp_init(void)
 		INIT_HLIST_HEAD(&dccp_hashinfo.bhash[i].chain);
 	}
 
-	if (init_dccp_v4_mibs())
+	rc = init_dccp_v4_mibs();
+	if (rc)
 		goto out_free_dccp_bhash;
 
 	rc = -EAGAIN;