projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b621ed1
)
kernel/drm: Move a NULL check to the proper place.
author
Sascha Wildner
<saw@online.de>
Fri, 30 Dec 2011 16:39:11 +0000
(17:39 +0100)
committer
Sascha Wildner
<saw@online.de>
Fri, 30 Dec 2011 16:39:11 +0000
(17:39 +0100)
sys/dev/drm/radeon_cs.c
patch
|
blob
|
blame
|
history
diff --git
a/sys/dev/drm/radeon_cs.c
b/sys/dev/drm/radeon_cs.c
index
e49830d
..
adc1209
100644
(file)
--- a/
sys/dev/drm/radeon_cs.c
+++ b/
sys/dev/drm/radeon_cs.c
@@
-142,16
+142,15
@@
int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *fpriv)
long size;
int r, i;
+ if (dev_priv == NULL) {
+ DRM_ERROR("called with no initialization\n");
+ return -EINVAL;
+ }
DRM_SPINLOCK(&dev_priv->cs.cs_mutex);
/* set command stream id to 0 which is fake id */
cs_id = 0;
cs->cs_id = cs_id;
- if (dev_priv == NULL) {
- DRM_ERROR("called with no initialization\n");
- DRM_SPINUNLOCK(&dev_priv->cs.cs_mutex);
- return -EINVAL;
- }
if (!cs->num_chunks) {
DRM_SPINUNLOCK(&dev_priv->cs.cs_mutex);
return 0;