Skip to contentSkip to conversation

core: fix return in error path of device probe

PATCH New Alexandre Courbot 1 participant 1 message Oct 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 core: fix return in error path of device probe

We want to unlock nv_devices_mutex in this error path as well.

---
 drm/nouveau/nvkm/engine/device/base.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drm/nouveau/nvkm/engine/device/base.c +2 -1
index bbc9824af6e0..7476ac271573 100644
@@ -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;
 		}
 	}
 
Signature · 6 lines
2.6.1

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau