提交 3fa96268 编写于 作者: D Dan Williams

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: NDan Williams <dan.j.williams@intel.com>
上级 979fccfb
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册