diff options
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r-- | drivers/nvdimm/btt.c | 2 | ||||
-rw-r--r-- | drivers/nvdimm/bus.c | 3 | ||||
-rw-r--r-- | drivers/nvdimm/namespace_devs.c | 2 |
3 files changed, 2 insertions, 5 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index c586bcdb5190..2ef544f10ec8 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -753,6 +753,7 @@ static struct arena_info *alloc_arena(struct btt *btt, size_t size, return NULL; arena->nd_btt = btt->nd_btt; arena->sector_size = btt->sector_size; + mutex_init(&arena->err_lock); if (!size) return arena; @@ -891,7 +892,6 @@ static int discover_arenas(struct btt *btt) goto out; } - mutex_init(&arena->err_lock); ret = btt_freelist_init(arena); if (ret) goto out; diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 0a5e6cd758fe..78eabc3a1ab1 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -1142,9 +1142,6 @@ int __init nvdimm_bus_init(void) { int rc; - BUILD_BUG_ON(sizeof(struct nd_smart_payload) != 128); - BUILD_BUG_ON(sizeof(struct nd_smart_threshold_payload) != 8); - rc = bus_register(&nvdimm_bus_type); if (rc) return rc; diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index bb3ba8cf24d4..658ada497be0 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c @@ -2408,7 +2408,7 @@ static struct device **scan_labels(struct nd_region *nd_region) static struct device **create_namespaces(struct nd_region *nd_region) { - struct nd_mapping *nd_mapping = &nd_region->mapping[0]; + struct nd_mapping *nd_mapping; struct device **devs; int i; |