diff options
author | Robert Noland <rnoland@2hip.net> | 2008-06-13 17:41:20 -0400 |
---|---|---|
committer | Robert Noland <rnoland@2hip.net> | 2008-06-13 17:41:34 -0400 |
commit | 29ffa0017d002f9e74de42817b962b6ca2e5f20a (patch) | |
tree | 0d4d581b72a1387baeb1ae2dce7550ef65bf724b | |
parent | 00b406390649175bb432da5693bfbd3360ad21b3 (diff) |
[FreeBSD] Fix another lock leak
Reported by vehemens
-rw-r--r-- | bsd-core/drm_bufs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c index 3508331a..c793634b 100644 --- a/bsd-core/drm_bufs.c +++ b/bsd-core/drm_bufs.c @@ -832,12 +832,12 @@ int drm_addbufs_sg(struct drm_device *dev, drm_buf_desc_t *request) if (request->count < 0 || request->count > 4096) return EINVAL; - DRM_SPINLOCK(&dev->dma_lock); - order = drm_order(request->size); if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER) return EINVAL; + DRM_SPINLOCK(&dev->dma_lock); + /* No more allocations after first buffer-using ioctl. */ if (dev->buf_use != 0) { DRM_SPINUNLOCK(&dev->dma_lock); |