habanalabs: patched cb equals user cb in device memset
authorOded Gabbay <oded.gabbay@gmail.com>
Wed, 22 Jan 2020 22:43:06 +0000 (00:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 12:00:11 +0000 (13:00 +0100)
commit68b73cd158d8a64dbb51a231e368c06bef33dfb1
tree531c0dcb399de1e40d94c75aba1bb7046f849d50
parent83946b4c96ee4f4c9c5151579338013621f0904e
habanalabs: patched cb equals user cb in device memset

[ Upstream commit cf01514c5c6efa2d521d35e68dff2e0674d08e91 ]

During device memory memset, the driver allocates and use a CB (command
buffer). To reuse existing code, it keeps a pointer to the CB in two
variables, user_cb and patched_cb. Therefore, there is no need to "put"
both the user_cb and patched_cb, as it will cause an underflow of the
refcnt of the CB.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/habanalabs/goya/goya.c