mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
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>
This commit is contained in:
parent
979fccfb73
commit
3fa9626865
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user