Commit 1373cc31 authored by Sukadev Bhattiprolu's avatar Sukadev Bhattiprolu Committed by Michael Ellerman

powerpc/powernv/vas: Fix order of cleanup in vas_window_init_dbgdir()

Fix the order of cleanup to ensure we free the name buffer in case
of an error creating 'hvwc' or 'info' files.
Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 2f65272a
...@@ -166,13 +166,13 @@ void vas_window_init_dbgdir(struct vas_window *window) ...@@ -166,13 +166,13 @@ void vas_window_init_dbgdir(struct vas_window *window)
return; return;
free_name:
kfree(window->dbgname);
window->dbgname = NULL;
remove_dir: remove_dir:
debugfs_remove_recursive(window->dbgdir); debugfs_remove_recursive(window->dbgdir);
window->dbgdir = NULL; window->dbgdir = NULL;
free_name:
kfree(window->dbgname);
window->dbgname = NULL;
} }
void vas_instance_init_dbgdir(struct vas_instance *vinst) void vas_instance_init_dbgdir(struct vas_instance *vinst)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment