Skip to content

Commit

Permalink
crypto: caam - change return value in case CAAM has no MDHA
Browse files Browse the repository at this point in the history
To be consistent with other CAAM modules, caamhash should return 0
instead of -ENODEV in case CAAM has no MDHA.

Based on commit 1b46c90 ("crypto: caam - convert top level drivers to libraries")
the value returned by entry point is never checked and
the exit point is always executed.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Iuliana Prodan authored and Herbert Xu committed Aug 9, 2019
1 parent 58068cf commit 0435d47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/caam/caamhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -2007,7 +2007,7 @@ int caam_algapi_hash_init(struct device *ctrldev)
* is not present.
*/
if (!md_inst)
return -ENODEV;
return 0;

/* Limit digest size based on LP256 */
if (md_vid == CHA_VER_VID_MD_LP256)
Expand Down

0 comments on commit 0435d47

Please sign in to comment.