[PATCH 3/7] staging: lustre: Rename a jump label for a kfree(key) call
From: SF Markus Elfring
Date: Sun Dec 13 2015 - 08:56:03 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 13 Dec 2015 10:56:35 +0100
This issue was detected by using the Coccinelle software.
Choose a jump label according to the current Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/staging/lustre/lustre/mdc/mdc_request.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 2a76685..2085ba6 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -1125,7 +1125,7 @@ static int mdc_ioc_fid2path(struct obd_export *exp, struct getinfo_fid2path *gf)
if (!fid_is_sane(&gf->gf_fid)) {
rc = -EINVAL;
- goto out;
+ goto free_key;
}
/* Val is struct getinfo_fid2path result plus path */
@@ -1133,20 +1133,19 @@ static int mdc_ioc_fid2path(struct obd_export *exp, struct getinfo_fid2path *gf)
rc = obd_get_info(NULL, exp, keylen, key, &vallen, gf, NULL);
if (rc != 0 && rc != -EREMOTE)
- goto out;
+ goto free_key;
if (vallen <= sizeof(*gf)) {
rc = -EPROTO;
- goto out;
+ goto free_key;
} else if (vallen > sizeof(*gf) + gf->gf_pathlen) {
rc = -EOVERFLOW;
- goto out;
+ goto free_key;
}
CDEBUG(D_IOCTL, "path get "DFID" from %llu #%d\n%s\n",
PFID(&gf->gf_fid), gf->gf_recno, gf->gf_linkno, gf->gf_path);
-
-out:
+free_key:
kfree(key);
return rc;
}
--
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/