summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2015-12-13 11:35:52 -0800
committerDan Williams <dan.j.williams@intel.com>2015-12-24 12:20:19 -0800
commit3fa962686568a1617d174e3d2f5d522e963077c5 (patch)
treed4ae4c23a88575384d60cba1663ac61363037d75 /drivers/nvdimm
parent979fccfb7348dbd968daf0249aa484a0297f83df (diff)
downloadlinux-3fa962686568a1617d174e3d2f5d522e963077c5.tar.bz2
libnvdimm, pfn: fix nd_pfn_validate() return value handling
The -ENODEV case indicates that the info-block needs to established. All other return codes cause nd_pfn_init() to abort. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r--drivers/nvdimm/pmem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index dc6866734f70..ab689bca727d 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -238,7 +238,9 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
nd_pfn->pfn_sb = pfn_sb;
rc = nd_pfn_validate(nd_pfn);
- if (rc == 0 || rc == -EBUSY)
+ if (rc == -ENODEV)
+ /* no info block, do init */;
+ else
return rc;
nd_region = to_nd_region(nd_pfn->dev.parent);