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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:03:09 +0000 (20:03 +0200)
commit6d421fb7a9eddd8ce0a05641a3db97283fe20699
tree7882f28832e6003481f32e0ff0fa92420e78ba15
parent5f29a2357c5c3f7a80ddb484f1514aff197b816b
habanalabs: fix possible memory leak in MMU DR fini

[ Upstream commit eb85eec858c1a5c11d3a0bff403f6440b05b40dc ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/habanalabs/common/mmu/mmu_v1.c