Staging: lustre: Remove unnecessary else after return
authorMelike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Fri, 27 Feb 2015 19:51:03 +0000 (21:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 00:33:47 +0000 (16:33 -0800)
WARNING: else is not generally useful after a break or return
Remove unnecessary else after return. That was found by running
checkpatch

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/client.c

index 0f83492ecaccffd88b1f223155f68141c6f8a50b..2ccb72a47a2553be98c293455985b881a1ce2deb 100644 (file)
@@ -1438,12 +1438,11 @@ static int ptlrpc_send_new_req(struct ptlrpc_request *req)
                if (req->rq_err) {
                        req->rq_status = rc;
                        return 1;
-               } else {
-                       spin_lock(&req->rq_lock);
-                       req->rq_wait_ctx = 1;
-                       spin_unlock(&req->rq_lock);
-                       return 0;
                }
+               spin_lock(&req->rq_lock);
+               req->rq_wait_ctx = 1;
+               spin_unlock(&req->rq_lock);
+               return 0;
        }
 
        CDEBUG(D_RPCTRACE, "Sending RPC pname:cluuid:pid:xid:nid:opc %s:%s:%d:%llu:%s:%d\n",