]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[CRYPTO] api: fix crypto_alloc_base() return value
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 11 Oct 2006 12:29:51 +0000 (22:29 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 11 Oct 2006 12:29:51 +0000 (22:29 +1000)
commit9765d262b8230b735c4b2815b041c09a00833cf1
treecf24840b4e1f06f1f1f756f52f4f9870b02a5ed3
parent53a5fbdc2dff55161a206ed1a1385a8fa8055c34
[CRYPTO] api: fix crypto_alloc_base() return value

This patch makes crypto_alloc_base() return proper return value.

- If kzalloc() failure happens within __crypto_alloc_tfm(),
  crypto_alloc_base() returns NULL. But crypto_alloc_base()
  is supposed to return error code as pointer. So this patch
  makes it return -ENOMEM in that case.

- crypto_alloc_base() is suppose to return -EINTR, if it is
  interrupted by signal. But it may not return -EINTR.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/api.c