summaryrefslogtreecommitdiff
path: root/rust/helpers/security.c
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-09-05 18:39:11 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2025-09-13 12:11:06 +0800
commit1e26339703e2afd397037defa798682b2b93dcc0 (patch)
tree9c84504a38713898ff5fca45d01eddc43d307f23 /rust/helpers/security.c
parent9048beca9c5614d486e2b492c0a7867164bf56a8 (diff)
crypto: qat - Replace kzalloc() + copy_from_user() with memdup_user()
Replace kzalloc() followed by copy_from_user() with memdup_user() to improve and simplify adf_ctl_alloc_resources(). memdup_user() returns either -ENOMEM or -EFAULT (instead of -EIO) if an error occurs. Remove the unnecessary device id initialization, since memdup_user() (like copy_from_user()) immediately overwrites it. No functional changes intended other than returning the more idiomatic error code -EFAULT. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'rust/helpers/security.c')
0 files changed, 0 insertions, 0 deletions