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:43:41 +0000 (19:43 +0200)
commit4d8fc7d8d7ed3e7405a8315a84c07b006151f634
tree15bd2131ce987dd4fafa077df6c9c0ba0d7a587c
parente1b2ae96ac051c673ed4ac83b769ddbf6420280f
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