}
num_wait_cmds = nvhost_sync_num_pts(sync_fence);
+ if (num_wait_cmds == 0)
+ return 0;
+
gk20a_channel_alloc_priv_cmdbuf(c, 4 * num_wait_cmds, &wait_cmd);
if (wait_cmd == NULL) {
gk20a_err(dev_from_gk20a(c->g),
struct gk20a_channel_syncpt *sp =
container_of(s, struct gk20a_channel_syncpt, ops);
nvhost_syncpt_set_min_eq_max_ext(sp->host1x_pdev, sp->id);
- nvhost_free_syncpt(sp->id);
+ nvhost_syncpt_put_ref_ext(sp->id);
kfree(sp);
}