This patch was generated by 'make coccicheck'
Signed-off-by: Balamanikandan Gunasundar <[email protected]>
---
.../lustre/lustre/obdclass/lprocfs_status.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
index 57c6ddd..c988be4 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);
--
1.7.9.5
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel