crypto: caam - change return value in case CAAM has no MDHA

To be consistent with other CAAM modules, caamhash should return 0
instead of -ENODEV in case CAAM has no MDHA.

Based on commit 1b46c90c8e ("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>
This commit is contained in:
Iuliana Prodan 2019-07-31 16:08:15 +03:00 committed by Herbert Xu
parent 58068cfc81
commit 0435d47e26
1 changed files with 1 additions and 1 deletions

View File

@ -2007,7 +2007,7 @@ int caam_algapi_hash_init(struct device *ctrldev)
* is not present. * is not present.
*/ */
if (!md_inst) if (!md_inst)
return -ENODEV; return 0;
/* Limit digest size based on LP256 */ /* Limit digest size based on LP256 */
if (md_vid == CHA_VER_VID_MD_LP256) if (md_vid == CHA_VER_VID_MD_LP256)