summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/bus.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2018-12-28 04:54:10 +0100
committerDan Williams <dan.j.williams@intel.com>2018-12-28 04:54:10 +0100
commit4b5f747e82b12b6d8ab815fc259827a615c7f2c3 (patch)
treeec5eb3857bbb776ac521f555978fcb78cc6bd2a8 /drivers/nvdimm/bus.c
parentlibnvdimm/security: Quiet security operations (diff)
parentlibnvdimm, namespace: Replace kmemdup() with kstrndup() (diff)
downloadlinux-4b5f747e82b12b6d8ab815fc259827a615c7f2c3.tar.xz
linux-4b5f747e82b12b6d8ab815fc259827a615c7f2c3.zip
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.c4
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;