summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2017-08-19 22:26:18 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-22 18:36:49 -0700
commit4599c8ebb2bbec3df5cfa306b3ef102bb8824181 (patch)
tree5cdeb2221ff4892676916978b6835e5f6c844c6b /drivers/staging/lustre
parent90d1e58830ec6060155ebfbb4645257be5d9b37b (diff)
downloadop-kernel-dev-4599c8ebb2bbec3df5cfa306b3ef102bb8824181.zip
op-kernel-dev-4599c8ebb2bbec3df5cfa306b3ef102bb8824181.tar.gz
staging: lustre: obdclass: no need to check for kfree
In class_config_llog_handler() a flag, inst, was used to determine if it was safe to call kfree. Its not needed so remove the flag. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr> Reviewed-by: Ben Evans <bevans@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/lustre/obdclass/obd_config.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index dc7b27e..32ffa25 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -1142,7 +1142,7 @@ int class_config_llog_handler(const struct lu_env *env,
char *inst_name = NULL;
int inst_len = 0;
size_t lcfg_len;
- int inst = 0, swab = 0;
+ int swab = 0;
lcfg = (struct lustre_cfg *)cfg_buf;
if (lcfg->lcfg_version == __swab32(LUSTRE_CFG_VERSION)) {
@@ -1233,7 +1233,6 @@ int class_config_llog_handler(const struct lu_env *env,
if (clli && clli->cfg_instance &&
LUSTRE_CFG_BUFLEN(lcfg, 0) > 0) {
- inst = 1;
inst_len = LUSTRE_CFG_BUFLEN(lcfg, 0) +
sizeof(clli->cfg_instance) * 2 + 4;
inst_name = kasprintf(GFP_NOFS, "%s-%p",
@@ -1304,9 +1303,7 @@ int class_config_llog_handler(const struct lu_env *env,
rc = class_process_config(lcfg_new);
kfree(lcfg_new);
-
- if (inst)
- kfree(inst_name);
+ kfree(inst_name);
break;
}
default:
OpenPOWER on IntegriCloud