mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
misc: cxl: clean up afu_read_config()
The sanity checks for overflow are not needed, because this is done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <[email protected]> Cc: Ian Munsie <[email protected]> Acked-by: Michael Neuling <[email protected]> Reviewed-by: Daniel Axtens <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
594069bc3d
commit
acb921a5a1
1 changed files with 1 additions and 6 deletions
|
|
@ -443,12 +443,7 @@ static ssize_t afu_read_config(struct file *filp, struct kobject *kobj,
|
|||
struct afu_config_record *cr = to_cr(kobj);
|
||||
struct cxl_afu *afu = to_cxl_afu(container_of(kobj->parent, struct device, kobj));
|
||||
|
||||
u64 i, j, val, size = afu->crs_len;
|
||||
|
||||
if (off > size)
|
||||
return 0;
|
||||
if (off + count > size)
|
||||
count = size - off;
|
||||
u64 i, j, val;
|
||||
|
||||
for (i = 0; i < count;) {
|
||||
val = cxl_afu_cr_read64(afu, cr->cr, off & ~0x7);
|
||||
|
|
|
|||
Loading…
Reference in a new issue