libnvdimm, namespace: Replace kmemdup() with kstrndup()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 11 Jun 2018 13:47:21 +0000 (16:47 +0300)
committerDan Williams <dan.j.williams@intel.com>
Mon, 10 Dec 2018 23:58:46 +0000 (15:58 -0800)
commit3d9cbe37c16ffd19eeab6b49a0311bbb999627d8
tree39d06daf02f50b4d896227790a4df77cde1781d6
parent9065ed1281a57f8cf84695b4a1e86ee9bd586b01
libnvdimm, namespace: Replace kmemdup() with kstrndup()

kstrndup() takes care of '\0' terminator for the strings.

Use it here instead of kmemdup() + explicit terminating the input string.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/namespace_devs.c