Module Name: src
Committed By: riastradh
Date: Wed Jul 24 02:41:44 UTC 2013
Modified Files:
src/sys/external/bsd/drm2/dist/drm [riastradh-drm2]: drm_stub.c
Log Message:
Tweak an error branch in drm_fill_in_dev a little.
Destroy the spin locks and mutices.
Other error branches require closer scrutiny.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.8 -r1.1.1.1.2.9 \
src/sys/external/bsd/drm2/dist/drm/drm_stub.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/dist/drm/drm_stub.c
diff -u src/sys/external/bsd/drm2/dist/drm/drm_stub.c:1.1.1.1.2.8 src/sys/external/bsd/drm2/dist/drm/drm_stub.c:1.1.1.1.2.9
--- src/sys/external/bsd/drm2/dist/drm/drm_stub.c:1.1.1.1.2.8 Wed Jul 24 02:41:28 2013
+++ src/sys/external/bsd/drm2/dist/drm/drm_stub.c Wed Jul 24 02:41:44 2013
@@ -316,6 +316,12 @@ int drm_fill_in_dev(struct drm_device *d
#endif
if (drm_ht_create(&dev->map_hash, 12)) {
+#ifdef __NetBSD__
+ spin_lock_destroy(&dev->count_lock);
+ spin_lock_destroy(&dev->event_lock);
+ linux_mutex_destroy(&dev->struct_mutex);
+ linux_mutex_destroy(&dev->ctxlist_mutex);
+#endif
return -ENOMEM;
}