diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2010-01-30 15:41:00 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-02-11 00:52:00 +0100 |
commit | dd19e44b28b12f7ea59ebb54d8ea18054da7f9d1 (patch) | |
tree | b41add6f15ebf6b7666f45b1b3d7002b3f29036b /drivers/gpu/drm/nouveau/nouveau_object.c | |
parent | drm/nv50: make the pgraph irq handler loop like the pre-nv50 version (diff) | |
download | linux-dd19e44b28b12f7ea59ebb54d8ea18054da7f9d1.tar.xz linux-dd19e44b28b12f7ea59ebb54d8ea18054da7f9d1.zip |
drm/nouveau: move dereferences after null checks
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_object.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_object.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c index 6c2cf81716df..e7c100ba63a1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_object.c +++ b/drivers/gpu/drm/nouveau/nouveau_object.c @@ -885,11 +885,12 @@ int nouveau_gpuobj_sw_new(struct nouveau_channel *chan, int class, struct nouveau_gpuobj **gpuobj_ret) { - struct drm_nouveau_private *dev_priv = chan->dev->dev_private; + struct drm_nouveau_private *dev_priv; struct nouveau_gpuobj *gpuobj; if (!chan || !gpuobj_ret || *gpuobj_ret != NULL) return -EINVAL; + dev_priv = chan->dev->dev_private; gpuobj = kzalloc(sizeof(*gpuobj), GFP_KERNEL); if (!gpuobj) |