mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: unit: free reg spaces in mockio test
Get rid of some simple memory leaks: free the two allocated register spaces at the end of the register space test. Change-Id: Ib6341c34e8b6830073d43afc9291e1ea1da7184e Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1934472 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Nicolas Benech <nbenech@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
e3653e7b5e
commit
520fe7c568
@@ -314,6 +314,10 @@ static int test_register_space(struct unit_module *m, struct gk20a *g,
|
||||
/* Calling this function again resets the recorder to use it again */
|
||||
nvgpu_posix_io_start_recorder(g);
|
||||
|
||||
/* Free the reg space structures, too */
|
||||
nvgpu_posix_io_delete_reg_space(g, 0x10000000);
|
||||
nvgpu_posix_io_delete_reg_space(g, 0x80000000);
|
||||
|
||||
/* Restore the old callbacks for other tests within this unit */
|
||||
nvgpu_posix_register_io(g, old_cbs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user