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>
This commit is contained in:
Jon Derrick 2019-03-15 18:05:15 -06:00 committed by Ben Skeggs
parent 7c13e5cc23
commit 307a312df9
1 changed files with 2 additions and 0 deletions

View File

@ -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;