summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/region.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nvdimm/region.c')
-rw-r--r--drivers/nvdimm/region.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvdimm/region.c b/drivers/nvdimm/region.c
index ade3dba81afd..9aba44e483e0 100644
--- a/drivers/nvdimm/region.c
+++ b/drivers/nvdimm/region.c
@@ -61,8 +61,11 @@ static int child_unregister(struct device *dev, void *data)
static int nd_region_remove(struct device *dev)
{
+ struct nd_region *nd_region = to_nd_region(dev);
+
/* flush attribute readers and disable */
nvdimm_bus_lock(dev);
+ nd_region->ns_seed = NULL;
dev_set_drvdata(dev, NULL);
nvdimm_bus_unlock(dev);