aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp
diff options
context:
space:
mode:
authorCyrille Pitchen <cyrille.pitchen@atmel.com>2017-02-09 17:51:21 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2017-02-15 13:23:33 +0800
commit19998acb0ff67cb8843668f3b94bdbe6018fa7d8 (patch)
tree30c4a789fee823f608a4496661d05e3094dd955e /drivers/crypto/ccp
parentcrypto: atmel-sha - fix missing "return" instructions (diff)
downloadlinux-dev-19998acb0ff67cb8843668f3b94bdbe6018fa7d8.tar.xz
linux-dev-19998acb0ff67cb8843668f3b94bdbe6018fa7d8.zip
crypto: atmel-sha - fix error management in atmel_sha_start()
This patch clarifies and fixes how errors should be handled by atmel_sha_start(). For update operations, the previous code wrongly assumed that (err != -EINPROGRESS) implies (err == 0). It's wrong because that doesn't take the error cases (err < 0) into account. This patch also adds many comments to detail all the possible returned values and what should be done in each case. Especially, when an error occurs, since atmel_sha_complete() has already been called, hence releasing the hardware, atmel_sha_start() must not call atmel_sha_finish_req() later otherwise atmel_sha_complete() would be called a second time. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp')
0 files changed, 0 insertions, 0 deletions