diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 73442bd824a741cd6cc99b36eca105c3ae84dad9..7e2c43f701bc451463c5273ed3a5a1e49f6be15f 100644 --- 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;