Re: [PATCH v2] crypto: chcr - Fix error handling related to 'chcr_alloc_shash'

2017-04-21 Thread Herbert Xu
On Thu, Apr 13, 2017 at 08:25:15PM +0200, Christophe JAILLET wrote: > Up to now, 'crypto_alloc_shash()' may return a valid pointer, an error > pointer or NULL (in case of invalid parameter) > Update it to always return an error pointer in case of error. It now > returns ERR_PTR(-EINVAL) instead of

[PATCH v2] crypto: chcr - Fix error handling related to 'chcr_alloc_shash'

2017-04-13 Thread Christophe JAILLET
Up to now, 'crypto_alloc_shash()' may return a valid pointer, an error pointer or NULL (in case of invalid parameter) Update it to always return an error pointer in case of error. It now returns ERR_PTR(-EINVAL) instead of NULL in case of invalid parameter. This simplifies error handling. Also