Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv6: drop unneeded goto

Delete jump to a label on the next line, when that label is not
used elsewhere.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier l;
@@

-if (...) goto l;
-l:
// </smpl>

Also remove the unnecessary ret variable.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Julia Lawall and committed by
David S. Miller
3d2f6d41 5e9615bf

+1 -7
+1 -7
net/ipv6/raw.c
··· 1327 1327 1328 1328 int __init rawv6_init(void) 1329 1329 { 1330 - int ret; 1331 - 1332 - ret = inet6_register_protosw(&rawv6_protosw); 1333 - if (ret) 1334 - goto out; 1335 - out: 1336 - return ret; 1330 + return inet6_register_protosw(&rawv6_protosw); 1337 1331 } 1338 1332 1339 1333 void rawv6_exit(void)