--- xorg_current/mesa/drm/bsd-core/drm_auth.c 2007-07-21 23:13:43.000000000 -0700 +++ drm-mine/bsd-core/drm_auth.c 2007-07-25 01:43:08.000000000 -0700 @@ -1,4 +1,4 @@ -/* drm_auth.h -- IOCTLs for authentication -*- linux-c -*- +/* drm_auth.c -- IOCTLs for authentication -*- linux-c -*- * Created: Tue Feb 2 08:37:54 1999 by faith@valinux.com */ /*- @@ -66,7 +66,6 @@ entry->priv = priv; entry->next = NULL; - DRM_LOCK(); if (dev->magiclist[hash].tail) { dev->magiclist[hash].tail->next = entry; dev->magiclist[hash].tail = entry; @@ -74,7 +73,6 @@ dev->magiclist[hash].head = entry; dev->magiclist[hash].tail = entry; } - DRM_UNLOCK(); return 0; } @@ -88,7 +86,6 @@ DRM_DEBUG("%d\n", magic); hash = drm_hash_magic(magic); - DRM_LOCK(); for (pt = dev->magiclist[hash].head; pt; prev = pt, pt = pt->next) { if (pt->magic == magic) { if (dev->magiclist[hash].head == pt) { @@ -100,11 +97,9 @@ if (prev) { prev->next = pt->next; } - DRM_UNLOCK(); return 0; } } - DRM_UNLOCK(); free(pt, M_DRM); return EINVAL; @@ -129,8 +124,8 @@ continue; } while (drm_find_file(dev, auth->magic)); file_priv->magic = auth->magic; - DRM_UNLOCK(); drm_add_magic(dev, file_priv, auth->magic); + DRM_UNLOCK(); } DRM_DEBUG("%u\n", auth->magic); @@ -152,8 +147,8 @@ drm_remove_magic(dev, auth->magic); DRM_UNLOCK(); return 0; - } else { - DRM_UNLOCK(); - return EINVAL; } + + DRM_UNLOCK(); + return EINVAL; }