summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-12-03 07:16:52 +0100
committerBen Skeggs <bskeggs@redhat.com>2014-12-21 23:37:37 +0100
commitc7e873f85fb60b1af589ac1b0c62353cfe0bbb29 (patch)
tree6ba26abed8221c6016b0b441c08870b402ab681d /drivers
parentdrm/nv50/kms: drop requirement that framebuffer bos be contig up-front (diff)
downloadlinux-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')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/bios/shadowramin.c6
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 *