|
@@ -499,11 +499,12 @@ vc4_create_shader_bo_ioctl(struct drm_device *dev, void *data,
|
|
if (IS_ERR(bo))
|
|
if (IS_ERR(bo))
|
|
return PTR_ERR(bo);
|
|
return PTR_ERR(bo);
|
|
|
|
|
|
- ret = copy_from_user(bo->base.vaddr,
|
|
|
|
|
|
+ if (copy_from_user(bo->base.vaddr,
|
|
(void __user *)(uintptr_t)args->data,
|
|
(void __user *)(uintptr_t)args->data,
|
|
- args->size);
|
|
|
|
- if (ret != 0)
|
|
|
|
|
|
+ args->size)) {
|
|
|
|
+ ret = -EFAULT;
|
|
goto fail;
|
|
goto fail;
|
|
|
|
+ }
|
|
/* Clear the rest of the memory from allocating from the BO
|
|
/* Clear the rest of the memory from allocating from the BO
|
|
* cache.
|
|
* cache.
|
|
*/
|
|
*/
|