diff options
Diffstat (limited to 'drivers/crypto/caam/error.c')
-rw-r--r-- | drivers/crypto/caam/error.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c index 3d7be4c05008..961331d1b6ab 100644 --- a/drivers/crypto/caam/error.c +++ b/drivers/crypto/caam/error.c | |||
@@ -265,10 +265,18 @@ void caam_jr_strstatus(struct device *jrdev, u32 status) | |||
265 | }; | 265 | }; |
266 | u32 ssrc = status >> JRSTA_SSRC_SHIFT; | 266 | u32 ssrc = status >> JRSTA_SSRC_SHIFT; |
267 | 267 | ||
268 | /* | ||
269 | * If there is no further error handling function, just | ||
270 | * print the error code, error string and exit. | ||
271 | */ | ||
272 | if (!status_src[ssrc].report_ssed) { | ||
273 | dev_err(jrdev, "%08x: %s: \n", status, status_src[ssrc].error); | ||
274 | return; | ||
275 | } | ||
276 | |||
268 | sprintf(outstr, "%s: ", status_src[ssrc].error); | 277 | sprintf(outstr, "%s: ", status_src[ssrc].error); |
269 | 278 | ||
270 | if (status_src[ssrc].report_ssed) | 279 | status_src[ssrc].report_ssed(status, outstr); |
271 | status_src[ssrc].report_ssed(status, outstr); | ||
272 | 280 | ||
273 | dev_err(jrdev, "%08x: %s\n", status, outstr); | 281 | dev_err(jrdev, "%08x: %s\n", status, outstr); |
274 | } | 282 | } |