Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58973deb authored by Gunasundar, Balamanikandan (B.)'s avatar Gunasundar, Balamanikandan (B.) Committed by Greg Kroah-Hartman
Browse files

Staging: lustre: Replace kzalloc and memcpy by kmemdup



This patch was generated by 'make coccicheck'

Signed-off-by: default avatarBalamanikandan Gunasundar <bgunasun@visteon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 109a1624
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);