Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1290620

[PATCH 3/7] staging: lustre: Rename a jump label for a kfree(key) call

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 3/7] staging: lustre: Rename a jump label for a kfree(key) call
Date 2015-12-13 15:00 +0100
Message-ID <qFflU-CN-3@gated-at.bofh.it> (permalink)
References <qEuGl-43C-5@gated-at.bofh.it> <qFfce-yf-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
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@users.sourceforge.net>
---
 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] staging-Lustre: Fine-tuning for some function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 14:50 +0100
  [PATCH 2/7] staging: lustre: Rename a jump label for  ptlrpc_req_finished() calls SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
    Re: [PATCH 2/7] staging: lustre: Rename a jump label for  ptlrpc_req_finished() calls Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-14 08:00 +0100
      Re: [PATCH 2/7] staging: lustre: Rename a jump label for  ptlrpc_req_finished() calls SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 10:10 +0100
        Re: [PATCH 2/7] staging: lustre: Rename a jump label for  ptlrpc_req_finished() calls Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-14 10:40 +0100
          Re: staging: lustre: Rename a jump label for ptlrpc_req_finished()  calls SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 11:10 +0100
  [PATCH 1/7] staging: lustre: Delete unnecessary goto statements in  six functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
    Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements  in six functions Joe Perches <joe@perches.com> - 2015-12-15 15:30 +0100
      Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements  in six functions Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-15 15:50 +0100
        Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements  in six functions Joe Perches <joe@perches.com> - 2015-12-15 16:10 +0100
          Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements  in six functions Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-15 18:50 +0100
            Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements  in six functions Joe Perches <joe@perches.com> - 2015-12-15 19:20 +0100
              Re: staging: lustre: Delete unnecessary goto statements in six  functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-15 19:30 +0100
                Re: staging: lustre: Delete unnecessary goto statements in six  functions Joe Perches <joe@perches.com> - 2015-12-15 19:40 +0100
                Re: staging: lustre: Delete unnecessary goto statements in six  functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-15 20:00 +0100
                Re: staging: lustre: Delete unnecessary goto statements in six  functions Joe Perches <joe@perches.com> - 2015-12-15 20:00 +0100
          Re: staging: lustre: Delete unnecessary goto statements in six  functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-15 19:10 +0100
            Re: staging: lustre: Delete unnecessary goto statements in six  functions Joe Perches <joe@perches.com> - 2015-12-15 19:30 +0100
  [PATCH 3/7] staging: lustre: Rename a jump label for a kfree(key)  call SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
  [PATCH 6/7] staging: lustre: A few checks less in  mgc_process_recover_log() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
  [PATCH 5/7] staging: lustre: Less checks in mgc_process_recover_log()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
    Re: [PATCH 5/7] staging: lustre: Less checks in  mgc_process_recover_log() after error detection Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-14 12:10 +0100
      Re: [PATCH 5/7] staging: lustre: Less checks in  mgc_process_recover_log() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 13:10 +0100
        Re: [PATCH 5/7] staging: lustre: Less checks in  mgc_process_recover_log() after error detection Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-14 13:40 +0100
          Re: staging: lustre: Less checks in mgc_process_recover_log() after  error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 13:50 +0100
            Re: staging: lustre: Less checks in mgc_process_recover_log() after  error detection Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-14 15:00 +0100
              Re: staging: lustre: Less checks in mgc_process_recover_log() after  error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 18:50 +0100
                Re: staging: lustre: Less checks in mgc_process_recover_log() after  error detection Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-15 12:50 +0100
                Re: staging: lustre: Less checks in mgc_process_recover_log() after  error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-15 16:10 +0100
  [PATCH 4/7] staging: lustre: Delete an unnecessary variable  initialisation in mgc_process_recover_log() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
  [PATCH 7/7] staging: lustre: Rename a jump label for module_put()  calls SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:10 +0100
  [PATCH v2 0/4] staging-Lustre: Fine-tuning for some function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-21 20:10 +0100
    [PATCH v2 1/4] staging: lustre: Delete unnecessary goto statements in  six functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-21 20:10 +0100
    [PATCH v2 4/4] staging: lustre: Fix a jump label position in  osc_get_info() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-21 20:20 +0100
    [PATCH v2 3/4] staging: lustre: Less checks in  mgc_process_recover_log() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-21 20:20 +0100
      Re: [PATCH v2 3/4] staging: lustre: Less checks in  mgc_process_recover_log() after error detection Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-22 00:50 +0100
        Re: [PATCH v2 3/4] staging: lustre: Less checks in  mgc_process_recover_log() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-22 08:20 +0100
        Re: [PATCH v2 3/4] staging: lustre: Less checks in  mgc_process_recover_log() after error detection Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-22 09:10 +0100
    [PATCH v2 2/4] staging: lustre: Delete an unnecessary variable  initialisation in mgc_process_recover_log() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-21 20:20 +0100

csiph-web