diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 848e51233..6544a652f 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -1912,18 +1912,18 @@ int gk20a_fifo_tsg_unbind_channel_verify_status(struct channel_gk20a *ch) { struct gk20a *g = ch->g; - if (g->ops.fifo.tsg_verify_status_ctx_reload) - g->ops.fifo.tsg_verify_status_ctx_reload(ch); - - if (g->ops.fifo.tsg_verify_status_faulted) - g->ops.fifo.tsg_verify_status_faulted(ch); - if (gk20a_fifo_channel_status_is_next(g, ch->chid)) { nvgpu_err(g, "Channel %d to be removed from TSG %d has NEXT set!", ch->chid, ch->tsgid); return -EINVAL; } + if (g->ops.fifo.tsg_verify_status_ctx_reload) + g->ops.fifo.tsg_verify_status_ctx_reload(ch); + + if (g->ops.fifo.tsg_verify_status_faulted) + g->ops.fifo.tsg_verify_status_faulted(ch); + return 0; }