Skip to content

Commit

Permalink
NFS: drop unneeded goto
Browse files Browse the repository at this point in the history
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 drop the unnecessary ret variable.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
JuliaLawall authored and trondmypd committed Jun 2, 2015
1 parent 9300fdb commit 13985b1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fs/nfs/nfs4idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,7 @@ nfs_idmap_delete(struct nfs_client *clp)

int nfs_idmap_init(void)
{
int ret;
ret = nfs_idmap_init_keyring();
if (ret != 0)
goto out;
out:
return ret;
return nfs_idmap_init_keyring();
}

void nfs_idmap_quit(void)
Expand Down

0 comments on commit 13985b1

Please sign in to comment.