mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails
Return proper error if class_create() fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
af834d457d
commit
daa1dee405
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user