diff options
author | Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> | 2017-12-20 04:10:29 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-03-13 07:10:15 +0300 |
commit | 1373cc31074dff09419d616c2ce911eea624cff5 (patch) | |
tree | 8084e28f09c36ddd955c8cf8236f89ca7dbcd406 /arch/powerpc/platforms | |
parent | 2f65272a2a304ec6aa32ad9a45b1506929406321 (diff) | |
download | linux-1373cc31074dff09419d616c2ce911eea624cff5.tar.xz |
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>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powernv/vas-debug.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/powernv/vas-debug.c b/arch/powerpc/platforms/powernv/vas-debug.c index ca22f1eae050..b4de4c6fd38b 100644 --- a/arch/powerpc/platforms/powernv/vas-debug.c +++ b/arch/powerpc/platforms/powernv/vas-debug.c @@ -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) |