mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
habanalabs: patched cb equals user cb in device memset
[ Upstream commit cf01514c5c ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
83946b4c96
commit
68b73cd158
@@ -4666,8 +4666,6 @@ static int goya_memset_device_memory(struct hl_device *hdev, u64 addr, u64 size,
|
||||
|
||||
rc = goya_send_job_on_qman0(hdev, job);
|
||||
|
||||
hl_cb_put(job->patched_cb);
|
||||
|
||||
hl_debugfs_remove_job(hdev, job);
|
||||
kfree(job);
|
||||
cb->cs_cnt--;
|
||||
|
||||
Reference in New Issue
Block a user