mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04: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 <[email protected]> Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
af834d457d
commit
daa1dee405
1 changed files with 3 additions and 1 deletions
|
|
@ -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 a new issue