Skip to content

Commit

Permalink
crypto: brcm - Fix SHA3-512 algorithm failure
Browse files Browse the repository at this point in the history
In Broadcom SPU driver, due to missing break statement
in spu2_hash_xlate() while mapping SPU2 equivalent
SHA3-512 value, -EINVAL is chosen and hence leading to
failure of SHA3-512 algorithm. This patch fixes the same.

Fixes: 9d12ba8 ("crypto: brcm - Add Broadcom SPU driver")
Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
raveendra padasalagi authored and Herbert Xu committed Jul 18, 2017
1 parent 5771a8c commit a7e6e5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/crypto/bcm/spu2.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ spu2_hash_xlate(enum hash_alg hash_alg, enum hash_mode hash_mode,
break;
case HASH_ALG_SHA3_512:
*spu2_type = SPU2_HASH_TYPE_SHA3_512;
break;
case HASH_ALG_LAST:
default:
err = -EINVAL;
Expand Down

0 comments on commit a7e6e5d

Please sign in to comment.