mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
Merge "msm: kgsl: Don't error out if dst size is not equal to src in copy_prop"
This commit is contained in:
commit
2d6312a106
1 changed files with 3 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2002,2007-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2002,2007-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#include <linux/delay.h>
|
||||
#include <linux/firmware.h>
|
||||
|
|
@ -2376,10 +2376,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue