Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2cb4965 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Don't error out if dst size is not equal to src in copy_prop"

parents 822e2aaa 7bad659c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -2409,10 +2409,8 @@ int adreno_reset(struct kgsl_device *device, int fault)
static int copy_prop(struct kgsl_device_getproperty *param,
		void *src, size_t size)
{
	if (param->sizebytes != size)
		return -EINVAL;

	if (copy_to_user(param->value, src, param->sizebytes))
	if (copy_to_user(param->value, src,
		min_t(u32, size, param->sizebytes)))
		return -EFAULT;

	return 0;