accel/habanalabs: call put_pid after hpriv list is updated
authorKoby Elbaz <kelbaz@habana.ai>
Tue, 6 Jun 2023 08:57:51 +0000 (11:57 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 9 Oct 2023 09:37:18 +0000 (12:37 +0300)
commit942f18c56d2106115bcf344cc7b0f762c6fc55c2
tree0399f82ca0e3de6e9f3d507348379ed65e4a524e
parent2b541cf91373b1bc1634a82b668022d50c05603c
accel/habanalabs: call put_pid after hpriv list is updated

Because we might still be using related resources, decrementing PID's
reference count should be done at later stages of the device release.
A good place is right after the representing private structure is
removed from LKD's list.

Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/device.c