]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: af_alg - rewrite NULL pointer check
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Fri, 31 Dec 2021 01:40:36 +0000 (09:40 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 7 Jan 2022 03:30:01 +0000 (14:30 +1100)
commit9a0a2b9e3fceb301b4b68bef4d02d08a3b6c29e3
tree36097762ae9524cbc46c2094cc197038c4cde865
parent7799c8276d9b566bfd9f72fe6a2cee9673b800d4
crypto: af_alg - rewrite NULL pointer check

Because of the possible alloc failure of the alloc_page(), it could
return NULL pointer.
And there is a check below the sg_assign_page().
But it will be more logical to move the NULL check before the
sg_assign_page().

Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/af_alg.c