On Fri, Sep 05, 2025 at 06:39:11PM +0200, Thorsten Blum wrote: > 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@xxxxxxxxx> > --- > drivers/crypto/intel/qat/qat_common/adf_ctl_drv.c | 13 +++---------- > 1 file changed, 3 insertions(+), 10 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt