summaryrefslogtreecommitdiff
path: root/bsd-core/drm_ioctl.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-10-02 04:48:54 +0000
committerEric Anholt <anholt@freebsd.org>2003-10-02 04:48:54 +0000
commita6b84f73e18d88524a906a319c6c8e3c44bd7dea (patch)
treebaef00cdac4a6e1fd77215e22d9e12ba92ed444a /bsd-core/drm_ioctl.c
parent4dee75ff58a50559cb8a92c276c0b952c2776154 (diff)
Mostly whitespace cleanups and style(9) fixes focused on "if(" -> "if ("
Change some nearby memset()s to bzero()s or to calloc allocations to take advantage of M_ZERO). Reverse some error tests to reduce high levels of indentation. Move the sg_cleanup() call out of the maplist loop in DRM(takedown)-- I can't see any need for it to be inside.
Diffstat (limited to 'bsd-core/drm_ioctl.c')
-rw-r--r--bsd-core/drm_ioctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bsd-core/drm_ioctl.c b/bsd-core/drm_ioctl.c
index 33146bb5..b9598b4e 100644
--- a/bsd-core/drm_ioctl.c
+++ b/bsd-core/drm_ioctl.c
@@ -113,7 +113,8 @@ int DRM(setunique)( DRM_IOCTL_ARGS )
dev->unique_len = u.unique_len;
dev->unique = DRM(alloc)(u.unique_len + 1, DRM_MEM_DRIVER);
- if(!dev->unique) return DRM_ERR(ENOMEM);
+ if (dev->unique == NULL)
+ return DRM_ERR(ENOMEM);
if (DRM_COPY_FROM_USER(dev->unique, u.unique, dev->unique_len))
return DRM_ERR(EFAULT);