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: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
2f65272a2a
commit
1373cc3107
@ -166,13 +166,13 @@ void vas_window_init_dbgdir(struct vas_window *window)
|
||||
|
||||
return;
|
||||
|
||||
free_name:
|
||||
kfree(window->dbgname);
|
||||
window->dbgname = NULL;
|
||||
|
||||
remove_dir:
|
||||
debugfs_remove_recursive(window->dbgdir);
|
||||
window->dbgdir = NULL;
|
||||
|
||||
free_name:
|
||||
kfree(window->dbgname);
|
||||
window->dbgname = NULL;
|
||||
}
|
||||
|
||||
void vas_instance_init_dbgdir(struct vas_instance *vinst)
|
||||
|
Loading…
x
Reference in New Issue
Block a user