diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-12-03 07:16:52 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-12-21 23:37:37 +0100 |
commit | c7e873f85fb60b1af589ac1b0c62353cfe0bbb29 (patch) | |
tree | 6ba26abed8221c6016b0b441c08870b402ab681d /drivers/gpu | |
parent | drm/nv50/kms: drop requirement that framebuffer bos be contig up-front (diff) | |
download | linux-c7e873f85fb60b1af589ac1b0c62353cfe0bbb29.tar.xz linux-c7e873f85fb60b1af589ac1b0c62353cfe0bbb29.zip |
drm/nouveau/bios: fix oops on pre-nv50 chipsets
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/bios/shadowramin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/shadowramin.c b/drivers/gpu/drm/nouveau/core/subdev/bios/shadowramin.c index 5e58bba0dd5c..a7a890fad1e5 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/shadowramin.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/shadowramin.c @@ -44,8 +44,10 @@ static void pramin_fini(void *data) { struct priv *priv = data; - nv_wr32(priv->bios, 0x001700, priv->bar0); - kfree(priv); + if (priv) { + nv_wr32(priv->bios, 0x001700, priv->bar0); + kfree(priv); + } } static void * |