diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-12-03 16:16:52 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-12-22 08:37:37 +1000 |
commit | c7e873f85fb60b1af589ac1b0c62353cfe0bbb29 (patch) | |
tree | 6ba26abed8221c6016b0b441c08870b402ab681d /drivers | |
parent | 9f6d2ce3058d28fad5a6edc5d78e2bc36727ee8a (diff) |
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.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 * |