Commit a10549f
crypto: inside-secure - Fix the return value of safexcel_xcbcmac_cra_init()
The commit 320406c ("crypto: inside-secure - Replace generic aes
with libaes") replaced crypto_alloc_cipher() with kmalloc(), but did not
modify the handling of the return value. When kmalloc() returns NULL,
PTR_ERR_OR_ZERO(NULL) returns 0, but in fact, the memory allocation has
failed, and -ENOMEM should be returned.
Fixes: 320406c ("crypto: inside-secure - Replace generic aes with libaes")
Signed-off-by: Li Huafei <[email protected]>
Acked-by: Antoine Tenart <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>1 parent d8920a7 commit a10549f
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2093 | 2093 | | |
2094 | 2094 | | |
2095 | 2095 | | |
2096 | | - | |
| 2096 | + | |
2097 | 2097 | | |
2098 | 2098 | | |
2099 | 2099 | | |
| |||
0 commit comments