diff options
Diffstat (limited to 'drivers/crypto/caam/error.c')
-rw-r--r-- | drivers/crypto/caam/error.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c index 9f25f5296029..0eabd81e1a90 100644 --- a/drivers/crypto/caam/error.c +++ b/drivers/crypto/caam/error.c | |||
@@ -16,9 +16,13 @@ | |||
16 | char *tmp; \ | 16 | char *tmp; \ |
17 | \ | 17 | \ |
18 | tmp = kmalloc(sizeof(format) + max_alloc, GFP_ATOMIC); \ | 18 | tmp = kmalloc(sizeof(format) + max_alloc, GFP_ATOMIC); \ |
19 | sprintf(tmp, format, param); \ | 19 | if (likely(tmp)) { \ |
20 | strcat(str, tmp); \ | 20 | sprintf(tmp, format, param); \ |
21 | kfree(tmp); \ | 21 | strcat(str, tmp); \ |
22 | kfree(tmp); \ | ||
23 | } else { \ | ||
24 | strcat(str, "kmalloc failure in SPRINTFCAT"); \ | ||
25 | } \ | ||
22 | } | 26 | } |
23 | 27 | ||
24 | static void report_jump_idx(u32 status, char *outstr) | 28 | static void report_jump_idx(u32 status, char *outstr) |