Skip to contentSkip to conversation

drm/nouveau/gr/gv100-: fix missing unlock on error in gf100_gr_chan_new()

PATCH New Yang Yingliang 1 participant 1 message May 4, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau/gr/gv100-: fix missing unlock on error in gf100_gr_chan_new()

Add the missing unlock before return from function gf100_gr_chan_new() in the error handling case.

Fixes ca081fff6ecc ("drm/nouveau/gr/gf100-: generate golden context during first object alloc")
---
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +1 -0
index 5f20079c3660..03389af3b40d 100644
@@ -443,6 +443,7 @@ gf100_gr_chan_new(struct nvkm_gr *base, struct nvkm_fifo_chan *fifoch,
 		ret = gf100_grctx_generate(gr, chan, fifoch->inst);
 		if (ret) {
 			nvkm_error(&base->engine.subdev, "failed to construct context\n");
+			mutex_unlock(&gr->fecs.mutex);
 			return ret;
 		}
 	}
Signature · 1 line
2.25.1