From aba5c1396a0838a394694ae26c0eaf86e8238f6c Mon Sep 17 00:00:00 2001 From: Aya Mahfouz Date: Fri, 27 Feb 2015 14:59:42 +0200 Subject: [PATCH] staging: lustre: mgc: remove unused variable This patch removes a variable that was simply used to store the return value of a function call before returning it. The issue was detected and resolved using the following coccinelle script: @@ identifier len,f; @@ -int len; ... when != len when strict -len = +return f(...); -return len; Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/mgc/mgc_request.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c index 8d3dbdce04ff..b24457554798 100644 --- a/drivers/staging/lustre/lustre/mgc/mgc_request.c +++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c @@ -690,8 +690,6 @@ static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) static int mgc_cleanup(struct obd_device *obd) { - int rc; - /* COMPAT_146 - old config logs may have added profiles we don't know about */ if (obd->obd_type->typ_refcnt <= 1) @@ -701,8 +699,7 @@ static int mgc_cleanup(struct obd_device *obd) lprocfs_obd_cleanup(obd); ptlrpcd_decref(); - rc = client_obd_cleanup(obd); - return rc; + return client_obd_cleanup(obd); } static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg) -- 2.34.1