diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index a90ad22b9823af7114ac95bce88ff77e68977055..e66c7a58505e20f189ddaaa11c5e197c26e314a6 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -691,8 +691,10 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type, closid_init(); ret = rdtgroup_create_info_dir(rdtgroup_default.kn); - if (ret) + if (ret) { + dentry = ERR_PTR(ret); goto out_cdp; + } dentry = kernfs_mount(fs_type, flags, rdt_root, RDTGROUP_SUPER_MAGIC, NULL);