summaryrefslogtreecommitdiff
path: root/drivers/crypto/caam/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/caam/error.c')
-rw-r--r--drivers/crypto/caam/error.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c
index 3d7be4c..961331d 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)
};
u32 ssrc = status >> JRSTA_SSRC_SHIFT;
+ /*
+ * If there is no further error handling function, just
+ * print the error code, error string and exit.
+ */
+ if (!status_src[ssrc].report_ssed) {
+ dev_err(jrdev, "%08x: %s: \n", status, status_src[ssrc].error);
+ return;
+ }
+
sprintf(outstr, "%s: ", status_src[ssrc].error);
- if (status_src[ssrc].report_ssed)
- status_src[ssrc].report_ssed(status, outstr);
+ status_src[ssrc].report_ssed(status, outstr);
dev_err(jrdev, "%08x: %s\n", status, outstr);
}