libnvdimm/btt: Fix a kmemdup failure check
authorAditya Pakki <pakki001@umn.edu>
Mon, 25 Mar 2019 21:55:27 +0000 (16:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2019 17:41:19 +0000 (19:41 +0200)
commitaf5b7a150ef8d8f7de063be78b591054d041e9cd
tree87d825632f61d8ef651b59be32e0e7247f65ea9f
parentf7ab4818f74e4d7e796b59fe847de12beb7063b3
libnvdimm/btt: Fix a kmemdup failure check

[ Upstream commit 486fa92df4707b5df58d6508728bdb9321a59766 ]

In case kmemdup fails, the fix releases resources and returns to
avoid the NULL pointer dereference.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvdimm/btt_devs.c