habanalabs: fix possible memory leak in MMU DR fini
authorOhad Sharabi <osharabi@habana.ai>
Mon, 3 Jan 2022 07:48:27 +0000 (09:48 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 28 Feb 2022 12:22:01 +0000 (14:22 +0200)
commiteb85eec858c1a5c11d3a0bff403f6440b05b40dc
treea597cfd325b2a8d1e460faee139bb0a40051551a
parentaff5d9d378e77a45f33cd933b8b8ddac8fe43528
habanalabs: fix possible memory leak in MMU DR fini

This patch fixes what seems to be copy paste error.

We will have a memory leak if the host-resident shadow is NULL (which
will likely happen as the DR and HR are not dependent).

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/mmu/mmu_v1.c