diff options
author | Gunasundar, Balamanikandan (B.) | 2015-05-12 12:35:52 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-05-31 02:19:36 +0200 |
commit | 58973deb5b831eafa3eb04efe8ed85dbfe52aa18 (patch) | |
tree | b5bba673025dd6e4c0dfbb4b96f67b4090cf298b | |
parent | staging: lustre: lclient: lcommon_cl.c fixing coding style issues (diff) | |
download | kernel-qcow2-linux-58973deb5b831eafa3eb04efe8ed85dbfe52aa18.tar.gz kernel-qcow2-linux-58973deb5b831eafa3eb04efe8ed85dbfe52aa18.tar.xz kernel-qcow2-linux-58973deb5b831eafa3eb04efe8ed85dbfe52aa18.zip |
Staging: lustre: Replace kzalloc and memcpy by kmemdup
This patch was generated by 'make coccicheck'
Signed-off-by: Balamanikandan Gunasundar <bgunasun@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index 57c6ddd95f3e..c988be4fc049 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -1711,13 +1711,12 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid) goto destroy_new; } /* not found - create */ - buffer = kzalloc(LNET_NIDSTR_SIZE, GFP_NOFS); + buffer = kmemdup(libcfs_nid2str(*nid), LNET_NIDSTR_SIZE, GFP_NOFS); if (buffer == NULL) { rc = -ENOMEM; goto destroy_new; } - memcpy(buffer, libcfs_nid2str(*nid), LNET_NIDSTR_SIZE); new_stat->nid_proc = lprocfs_register(buffer, obd->obd_proc_exports_entry, NULL, NULL); |