Commit daa1dee4 authored by Axel Lin's avatar Axel Lin Committed by Dan Williams

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

Return proper error if class_create() fails.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent af834d45
...@@ -699,8 +699,10 @@ int __init nvdimm_bus_init(void) ...@@ -699,8 +699,10 @@ int __init nvdimm_bus_init(void)
nvdimm_major = rc; nvdimm_major = rc;
nd_class = class_create(THIS_MODULE, "nd"); 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; goto err_class;
}
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment