libnvdimm/namespace: Fix a potential NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Tue, 12 Mar 2019 08:20:34 +0000 (03:20 -0500)
committerDan Williams <dan.j.williams@intel.com>
Fri, 22 Mar 2019 23:19:54 +0000 (16:19 -0700)
commit55c1fc0af29a6c1b92f217b7eb7581a882e0c07c
treee63fa83ae1ccc403b1330ecc0269c4930e190a87
parent351f339faa308c1c1461314a18c832239a841ca0
libnvdimm/namespace: Fix a potential NULL pointer dereference

In case kmemdup fails, the fix goes to blk_err to avoid NULL
pointer dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/namespace_devs.c