diff options
author | Jon Derrick <jonathan.derrick@intel.com> | 2019-03-16 03:05:15 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2019-05-01 04:08:39 +0300 |
commit | 307a312df9c43fdea286ad17f748aaf777cc434a (patch) | |
tree | 8f85865501a0929fb9f25be68eb6f8c25b97f41b /drivers/gpu | |
parent | 7c13e5cc2391950541f41fc9ab0336aae77c7f63 (diff) | |
download | linux-307a312df9c43fdea286ad17f748aaf777cc434a.tar.xz |
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')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 2 |
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; |