Loading
crypto: caam - Add check for kcalloc() in test_len()
As kcalloc() may fail, check its return value to avoid a NULL pointer dereference when passing the buffer to rng->read(). On allocation failure, log the error and return since test_len() returns void. Fixes: 2be0d806 ("crypto: caam - add a test for the RNG") Cc: stable@vger.kernel.org Signed-off-by:Guangshuo Li <lgs201920130244@gmail.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>