summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorJon Derrick <jonathan.derrick@intel.com>2019-03-16 01:05:15 +0100
committerBen Skeggs <bskeggs@redhat.com>2019-05-01 03:08:39 +0200
commit307a312df9c43fdea286ad17f748aaf777cc434a (patch)
tree8f85865501a0929fb9f25be68eb6f8c25b97f41b /drivers/gpu/drm/nouveau
parentMerge tag 'drm-intel-next-fixes-2019-04-25' of git://anongit.freedesktop.org/... (diff)
downloadlinux-307a312df9c43fdea286ad17f748aaf777cc434a.tar.xz
linux-307a312df9c43fdea286ad17f748aaf777cc434a.zip
drm/nouveau/bar/nv50: check bar1 vmm return value
Check bar1's new vmm creation return value for errors. Signed-off-by: Jon Derrick <jonathan.derrick@intel.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
index 157b076a1272..8e64b19f3f8a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
@@ -168,6 +168,8 @@ nv50_bar_oneinit(struct nvkm_bar *base)
ret = nvkm_vmm_new(device, start, limit-- - start, NULL, 0,
&bar1_lock, "bar1", &bar->bar1_vmm);
+ if (ret)
+ return ret;
atomic_inc(&bar->bar1_vmm->engref[NVKM_SUBDEV_BAR]);
bar->bar1_vmm->debug = bar->base.subdev.debug;