提交 daa1dee4 编写于 作者: A Axel Lin 提交者: Dan Williams

nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails

Return proper error if class_create() fails.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 af834d45
......@@ -699,8 +699,10 @@ int __init nvdimm_bus_init(void)
nvdimm_major = rc;
nd_class = class_create(THIS_MODULE, "nd");
if (IS_ERR(nd_class))
if (IS_ERR(nd_class)) {
rc = PTR_ERR(nd_class);
goto err_class;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册