Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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)