summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2020-01-22 23:43:06 +0100
committerOded Gabbay <oded.gabbay@gmail.com>2020-02-11 10:12:47 +0100
commitcf01514c5c6efa2d521d35e68dff2e0674d08e91 (patch)
tree7b6f3013273ca018b85e369eb05010f81c3b7d19 /drivers/misc
parenthabanalabs: do not halt CoreSight during hard reset (diff)
downloadlinux-cf01514c5c6efa2d521d35e68dff2e0674d08e91.tar.xz
linux-cf01514c5c6efa2d521d35e68dff2e0674d08e91.zip
habanalabs: patched cb equals user cb in device memset
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/habanalabs/goya/goya.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index f24fe909b88d..b8a8de24aaf7 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -4690,8 +4690,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--;