mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 07:23:14 +00: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