Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit daa1dee4 authored by Axel Lin's avatar Axel Lin Committed by Dan Williams
Browse files

nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails



Return proper error if class_create() fails.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent af834d45
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;