summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-core')
-rw-r--r--bsd-core/drm_sysctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bsd-core/drm_sysctl.c b/bsd-core/drm_sysctl.c
index 905f4c24..4bb603f4 100644
--- a/bsd-core/drm_sysctl.c
+++ b/bsd-core/drm_sysctl.c
@@ -224,12 +224,11 @@ static int DRM(bufs_info) DRM_SYSCTL_HANDLER_ARGS
* copy of the whole structure and the relevant data from buflist.
*/
DRM_LOCK();
- DRM_SPINLOCK(&dev->dma_lock);
if (dma == NULL) {
- DRM_SPINUNLOCK(&dev->dma_lock);
DRM_UNLOCK();
return 0;
}
+ DRM_SPINLOCK(&dev->dma_lock);
tempdma = *dma;
templists = DRM(alloc)(sizeof(int) * dma->buf_count, DRM_MEM_BUFS);
for (i = 0; i < dma->buf_count; i++)