Skip to content

Commit 5ce91a9

Browse files
v-thakkargregkh
authored andcommitted
Staging: lustre: Return statement is moved left after removing else
This patch fixes following checkpatch.pl warning using coccinelle: WARNING: else is not generally useful after a break or return Semantic patch used for this is as follows: @rule1@ expression e1; @@ if (e1) { ... return ...; } - else{ ... - } @Rule2@ expression e2; statement s1; @@ if(e2) { ... return ...; } - else s1 Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 26c4ea4 commit 5ce91a9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • drivers/staging/lustre/lustre/ptlrpc

‎drivers/staging/lustre/lustre/ptlrpc/niobuf.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,7 @@ int ptlrpc_reply(struct ptlrpc_request *req)
442442
{
443443
if (req->rq_no_reply)
444444
return 0;
445-
else
446-
return ptlrpc_send_reply(req, 0);
445+
return ptlrpc_send_reply(req, 0);
447446
}
448447
EXPORT_SYMBOL(ptlrpc_reply);
449448

0 commit comments

Comments
 (0)