From: Julia Lawall Date: Mon, 1 Sep 2014 20:21:10 +0000 (+0200) Subject: staging: lustre: ldlm: simplify rc initialization X-Git-Tag: v5.15~17125^2~860 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31664dc6f8462a843fbddf6807498f452a7727be;p=platform%2Fkernel%2Flinux-starfive.git staging: lustre: ldlm: simplify rc initialization Simplify initialization of rc to take advantage of the fact that it is done at statement level. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index 655a1c7..9ce437b 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -569,7 +569,8 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, if (lvb_len != 0) rc = ldlm_fill_lvb(lock, &req->rq_pill, RCL_SERVER, lvb, size); - rc = (rc != 0 ? rc : ELDLM_LOCK_ABORTED); + if (rc == 0) + rc = ELDLM_LOCK_ABORTED; goto cleanup; }