projects
/
profile
/
common
/
platform
/
kernel
/
linux-artik7.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af834d4
)
nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails
author
Axel Lin
<axel.lin@ingics.com>
Sun, 28 Jun 2015 09:00:57 +0000
(17:00 +0800)
committer
Dan Williams
<dan.j.williams@intel.com>
Tue, 30 Jun 2015 18:30:34 +0000
(14:30 -0400)
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>
drivers/nvdimm/bus.c
patch
|
blob
|
history
diff --git
a/drivers/nvdimm/bus.c
b/drivers/nvdimm/bus.c
index
73442bd
..
7e2c43f
100644
(file)
--- a/
drivers/nvdimm/bus.c
+++ b/
drivers/nvdimm/bus.c
@@
-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;