aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2010-01-25 05:28:21 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-28 09:31:05 -0500
commite924960dacdf85d118a98c7262edf2f99c3015cf (patch)
treea11378743ad6c653989f686722a3fc829e2a4c66 /net/ipv6
parentce96bc86bf2ee12e8a3bf461ca8027557c1ef42f (diff)
netns xfrm: fixup xfrm6_tunnel error propagation
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/xfrm6_tunnel.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
index 438831d33593..23fb1002124c 100644
--- a/net/ipv6/xfrm6_tunnel.c
+++ b/net/ipv6/xfrm6_tunnel.c
@@ -353,13 +353,19 @@ static struct xfrm6_tunnel xfrm46_tunnel_handler = {
353 353
354static int __init xfrm6_tunnel_init(void) 354static int __init xfrm6_tunnel_init(void)
355{ 355{
356 if (xfrm_register_type(&xfrm6_tunnel_type, AF_INET6) < 0) 356 int rv;
357
358 rv = xfrm_register_type(&xfrm6_tunnel_type, AF_INET6);
359 if (rv < 0)
357 goto err; 360 goto err;
358 if (xfrm6_tunnel_register(&xfrm6_tunnel_handler, AF_INET6)) 361 rv = xfrm6_tunnel_register(&xfrm6_tunnel_handler, AF_INET6);
362 if (rv < 0)
359 goto unreg; 363 goto unreg;
360 if (xfrm6_tunnel_register(&xfrm46_tunnel_handler, AF_INET)) 364 rv = xfrm6_tunnel_register(&xfrm46_tunnel_handler, AF_INET);
365 if (rv < 0)
361 goto dereg6; 366 goto dereg6;
362 if (xfrm6_tunnel_spi_init() < 0) 367 rv = xfrm6_tunnel_spi_init();
368 if (rv < 0)
363 goto dereg46; 369 goto dereg46;
364 return 0; 370 return 0;
365 371
@@ -370,7 +376,7 @@ dereg6:
370unreg: 376unreg:
371 xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); 377 xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6);
372err: 378err:
373 return -EAGAIN; 379 return rv;
374} 380}
375 381
376static void __exit xfrm6_tunnel_fini(void) 382static void __exit xfrm6_tunnel_fini(void)