diff options
author | Dan Williams <dan.j.williams@intel.com> | 2018-12-27 19:54:10 -0800 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-12-27 19:54:10 -0800 |
commit | 4b5f747e82b12b6d8ab815fc259827a615c7f2c3 (patch) | |
tree | ec5eb3857bbb776ac521f555978fcb78cc6bd2a8 /drivers/nvdimm/bus.c | |
parent | 37379cfc661e51607733f266d9f407b4f8aee16b (diff) | |
parent | 3d9cbe37c16ffd19eeab6b49a0311bbb999627d8 (diff) | |
download | linux-4b5f747e82b12b6d8ab815fc259827a615c7f2c3.tar.bz2 |
Merge miscellaneous libnvdimm updates for 4.21
* Use common helpers, bitmap_zalloc() and kstrndup(), to replace open
coded versions.
* Clarify the comments around hotplug vs initial init case for the nfit
driver.
* Cleanup the libnvdimm init path.
Diffstat (limited to 'drivers/nvdimm/bus.c')
-rw-r--r-- | drivers/nvdimm/bus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index adb01c1f92de..dca5f7a805cb 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -350,12 +350,12 @@ struct nvdimm_bus *nvdimm_bus_register(struct device *parent, INIT_LIST_HEAD(&nvdimm_bus->mapping_list); init_waitqueue_head(&nvdimm_bus->probe_wait); nvdimm_bus->id = ida_simple_get(&nd_ida, 0, 0, GFP_KERNEL); - mutex_init(&nvdimm_bus->reconfig_mutex); - badrange_init(&nvdimm_bus->badrange); if (nvdimm_bus->id < 0) { kfree(nvdimm_bus); return NULL; } + mutex_init(&nvdimm_bus->reconfig_mutex); + badrange_init(&nvdimm_bus->badrange); nvdimm_bus->nd_desc = nd_desc; nvdimm_bus->dev.parent = parent; nvdimm_bus->dev.release = nvdimm_bus_release; |