diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-09-17 14:48:06 +0200 |
|---|---|---|
| committer | Jeff Hugo <jeff.hugo@oss.qualcomm.com> | 2025-10-06 14:13:55 -0600 |
| commit | bed1291240e19782873120c59c305e24d94407a1 (patch) | |
| tree | 619e2183876bb55b6248ae10ee6f39549206d63e /tools/perf/scripts/python | |
| parent | 9c815230630cb4e80e78ed3ef40909a71fc92403 (diff) | |
| download | linux-bed1291240e19782873120c59c305e24d94407a1.tar.gz linux-bed1291240e19782873120c59c305e24d94407a1.zip | |
accel/qaic: Replace kcalloc + copy_from_user with memdup_array_user
Replace kcalloc() followed by copy_from_user() with memdup_array_user()
to improve and simplify both __qaic_execute_bo_ioctl() and
qaic_perf_stats_bo_ioctl().
In __qaic_execute_bo_ioctl(), return early if an error occurs and remove
the obsolete 'free_exec' label.
Since memdup_array_user() already checks for multiplication overflow,
remove the manual check in __qaic_execute_bo_ioctl(). Remove any unused
local variables accordingly.
Since 'ret = copy_from_user()' has been removed, initialize 'ret = 0' to
preserve the same return value on success.
No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250917124805.90395-4-thorsten.blum@linux.dev
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
