summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/drm/drm_sysctl.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/drm/drm_sysctl.h b/sys/dev/drm/drm_sysctl.h
index 00bf90e..ee25d90 100644
--- a/sys/dev/drm/drm_sysctl.h
+++ b/sys/dev/drm/drm_sysctl.h
@@ -226,12 +226,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++)
OpenPOWER on IntegriCloud