drm/nouveau/core: fix return in error path of device probe
authorAlexandre Courbot <acourbot@nvidia.com>
Mon, 26 Oct 2015 05:55:37 +0000 (14:55 +0900)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 11 Jan 2016 01:17:40 +0000 (11:17 +1000)
We want to unlock nv_devices_mutex in this error path as well.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c

index bbc9824af6e037e01bfb60cae32d1a801e8b095f..7476ac2715735fa8960e213347f2ecfcb3e9a60e 100644 (file)
@@ -2494,7 +2494,8 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
                device->pri = ioremap(mmio_base, mmio_size);
                if (!device->pri) {
                        nvdev_error(device, "unable to map PRI\n");
-                       return -ENOMEM;
+                       ret = -ENOMEM;
+                       goto done;
                }
        }