Merge branch 'for-4.16/nfit' into libnvdimm-for-next
[sfrench/cifs-2.6.git] / drivers / acpi / nfit / core.c
index aa9d00db763a2383663e36f20a3a8509c08907da..bbe48ad20886c8530fe525ffe9f35725d1df1ddc 100644 (file)
@@ -1883,6 +1883,9 @@ static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc)
                struct kernfs_node *nfit_kernfs;
 
                nvdimm = nfit_mem->nvdimm;
+               if (!nvdimm)
+                       continue;
+
                nfit_kernfs = sysfs_get_dirent(nvdimm_kobj(nvdimm)->sd, "nfit");
                if (nfit_kernfs)
                        nfit_mem->flags_attr = sysfs_get_dirent(nfit_kernfs,