sparse cleanups
parent
bbcba83ef7
commit
8fef6fe4f0
|
@ -232,14 +232,14 @@ int drm_getsareactx(struct inode *inode, struct file *filp,
|
||||||
map = dev->context_sareas[request.ctx_id];
|
map = dev->context_sareas[request.ctx_id];
|
||||||
up(&dev->struct_sem);
|
up(&dev->struct_sem);
|
||||||
|
|
||||||
request.handle = 0;
|
request.handle = NULL;
|
||||||
list_for_each_entry(_entry, &dev->maplist->head,head) {
|
list_for_each_entry(_entry, &dev->maplist->head,head) {
|
||||||
if (_entry->map == map) {
|
if (_entry->map == map) {
|
||||||
request.handle = (void *)(unsigned long)_entry->user_token;
|
request.handle = (void *)(unsigned long)_entry->user_token;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (request.handle == 0)
|
if (request.handle == NULL)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (copy_to_user(argp, &request, sizeof(request)))
|
if (copy_to_user(argp, &request, sizeof(request)))
|
||||||
|
|
Loading…
Reference in New Issue