diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-06-06 11:39:30 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-06-15 14:31:40 -0700 |
commit | 8f2bc2430e4ec53ea961997d760c3b35f729e444 (patch) | |
tree | b22d8530aca1b1c470c34f6ae46110f030bc4198 /drivers/acpi/nfit/core.c | |
parent | faec6f8a1cd2c44e439de35ab3328c5cf7bf52d8 (diff) | |
download | blackbird-op-linux-8f2bc2430e4ec53ea961997d760c3b35f729e444.tar.gz blackbird-op-linux-8f2bc2430e4ec53ea961997d760c3b35f729e444.zip |
libnvdimm, label: populate 'isetcookie' for blk-aperture namespaces
Starting with the v1.2 definition of namespace labels, the isetcookie
field is populated and validated for blk-aperture namespaces. This adds
some safety against inadvertent copying of namespace labels from one
DIMM-device to another.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/acpi/nfit/core.c')
-rw-r--r-- | drivers/acpi/nfit/core.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 436cfdd1215b..b930d12f636b 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -1736,12 +1736,12 @@ static int acpi_nfit_init_interleave_set(struct acpi_nfit_desc *acpi_desc, struct nd_region_desc *ndr_desc, struct acpi_nfit_system_address *spa) { - int i, spa_type = nfit_spa_type(spa); struct device *dev = acpi_desc->dev; struct nd_interleave_set *nd_set; u16 nr = ndr_desc->num_mappings; struct nfit_set_info2 *info2; struct nfit_set_info *info; + int i; nd_set = devm_kzalloc(dev, sizeof(*nd_set), GFP_KERNEL); if (!nd_set) @@ -1749,11 +1749,6 @@ static int acpi_nfit_init_interleave_set(struct acpi_nfit_desc *acpi_desc, ndr_desc->nd_set = nd_set; guid_copy(&nd_set->type_guid, (guid_t *) spa->range_guid); - if (spa_type == NFIT_SPA_PM || spa_type == NFIT_SPA_VOLATILE) - /* pass */; - else - return 0; - info = devm_kzalloc(dev, sizeof_nfit_set_info(nr), GFP_KERNEL); if (!info) return -ENOMEM; |