Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: iaa - Fix incorrect return value in save_iaa_wq()

The save_iaa_wq() function unconditionally returns 0, even when an error
is encountered. This prevents the error code from being propagated to the
caller.

Fix this by returning the 'ret' variable, which holds the actual status
of the operations within the function.

Fixes: ea7a5cbb43696 ("crypto: iaa - Add Intel IAA Compression Accelerator crypto driver core")
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Zilin Guan and committed by
Herbert Xu
76ce17f6 2236fc00

+1 -1
+1 -1
drivers/crypto/intel/iaa/iaa_crypto_main.c
··· 805 805 if (!cpus_per_iaa) 806 806 cpus_per_iaa = 1; 807 807 out: 808 - return 0; 808 + return ret; 809 809 } 810 810 811 811 static void remove_iaa_wq(struct idxd_wq *wq)