[PATCH 2/2] x86/resctrl: Optimize code in rdt_get_tree()
From: Shaopeng Tan
Date: Tue Jun 10 2025 - 22:18:52 EST
Inconsistent context format. Optimize it,
not only save a line and also make it easier to understand.
Signed-off-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
---
fs/resctrl/rdtgroup.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
index 1beb124e25f6..8bf87211eadb 100644
--- a/fs/resctrl/rdtgroup.c
+++ b/fs/resctrl/rdtgroup.c
@@ -2608,10 +2608,8 @@ static int rdt_get_tree(struct fs_context *fc)
goto out_root;
ret = schemata_list_create();
- if (ret) {
- schemata_list_destroy();
- goto out_ctx;
- }
+ if (ret)
+ goto out_schemata_free;
ret = closid_init();
if (ret)
--
2.43.5