staging/lustre/mdc: drop unneeded goto
authorJulia Lawall <Julia.Lawall@lip6.fr>
Thu, 28 May 2015 21:02:23 +0000 (23:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 May 2015 02:28:48 +0000 (11:28 +0900)
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>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/mdc/mdc_request.c

index 9f34d67b8f4e0470a1deea79db26c98ff8a812d3..c9639413b105b9150a55d3a6265376021460d018 100644 (file)
@@ -1818,10 +1818,7 @@ static int mdc_ioc_swap_layouts(struct obd_export *exp,
        ptlrpc_request_set_replen(req);
 
        rc = ptlrpc_queue_wait(req);
-       if (rc)
-               goto out;
 
-out:
        ptlrpc_req_finished(req);
        return rc;
 }