diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index e2375361a34d5cbfd5a39347aa255e7b48b562bb..afa3e99fd48a1c55a09f692abde13d1368baaa8a 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -752,10 +752,8 @@ static int i915_getparam(struct drm_device *dev, void *data, return -EINVAL; } - if (copy_to_user(param->value, &value, sizeof(int))) { - DRM_ERROR("copy_to_user failed\n"); + if (put_user(value, param->value)) return -EFAULT; - } return 0; }