[Nouveau] [PATCH 3/3] drm/nv31/mpeg: fix mpeg engine initialization

Ilia Mirkin imirkin at alum.mit.edu
Fri Jul 26 21:27:01 PDT 2013


object->engine is null, which leads to a null deref down the line

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---

This fixes loading the mpeg class on my nv44 card, although things
still don't work. (Likely due to a mesa-related bug.)

I guess this should apply to stable branches starting with 3.7...

 drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c
index 49ecbb8..9f7c7d5 100644
--- a/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c
+++ b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c
@@ -265,8 +265,8 @@ nv31_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
 int
 nv31_mpeg_init(struct nouveau_object *object)
 {
-	struct nouveau_engine *engine = nv_engine(object->engine);
-	struct nv31_mpeg_priv *priv = (void *)engine;
+	struct nouveau_engine *engine = nv_engine(object);
+	struct nv31_mpeg_priv *priv = (void *)object;
 	struct nouveau_fb *pfb = nouveau_fb(object);
 	int ret, i;
 
-- 
1.8.1.5



More information about the Nouveau mailing list