Skip to content

Commit

Permalink
habanalabs: patched cb equals user cb in device memset
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ogabbay committed Feb 11, 2020
1 parent a37e471 commit cf01514
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/misc/habanalabs/goya/goya.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit cf01514

Please sign in to comment.