Skip to content

Commit a2f5990

Browse files
Li HuafeiLyude
authored andcommitted
drm/nouveau/gr/gf100: Fix missing unlock in gf100_gr_chan_new()
When the call to gf100_grctx_generate() fails, unlock gr->fecs.mutex before returning the error. Fixes smatch warning: drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:480 gf100_gr_chan_new() warn: inconsistent returns '&gr->fecs.mutex'. Fixes: ca081ff ("drm/nouveau/gr/gf100-: generate golden context during first object alloc") Signed-off-by: Li Huafei <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 973db93 commit a2f5990

File tree

1 file changed

+1
-0
lines changed
  • drivers/gpu/drm/nouveau/nvkm/engine/gr

1 file changed

+1
-0
lines changed

drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ gf100_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
443443
ret = gf100_grctx_generate(gr, chan, fifoch->inst);
444444
if (ret) {
445445
nvkm_error(&base->engine.subdev, "failed to construct context\n");
446+
mutex_unlock(&gr->fecs.mutex);
446447
return ret;
447448
}
448449
}

0 commit comments

Comments
 (0)