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:
Sukadev Bhattiprolu
2018-03-13 15:10:15 +11:00
committed by Michael Ellerman
parent 2f65272a2a
commit 1373cc3107
+4 -4
View File
@@ -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)