habanalabs: Call put_pid() when releasing control device
authorTomer Tayar <ttayar@habana.ai>
Fri, 19 Feb 2021 12:05:33 +0000 (14:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:16:09 +0000 (09:16 +0100)
commit27ac5aada024e0821c86540ad18f37edadd77d5e
tree6747c23e5b06eb5f10165666a64563e32c4ab7bd
parentbd0c48e53d2fadcc7f62056c46a05718370b7939
habanalabs: Call put_pid() when releasing control device

The refcount of the "hl_fpriv" structure is not used for the control
device, and thus hl_hpriv_put() is not called when releasing this
device.
This results with no call to put_pid(), so add it explicitly in
hl_device_release_ctrl().

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/device.c