diff options
author | Kim Phillips <kim.phillips@freescale.com> | 2012-09-06 22:17:03 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-09-06 22:17:03 +0200 |
commit | 2af8f4a2727998eb3f4ff1edfffaca99955ef22e (patch) | |
tree | 8afadd6ec6ed66f25635b27c13c487f1dac06047 /drivers/crypto/caam/key_gen.c | |
parent | crypto: ux500/hash - remove unneeded return at ux500_hash_mod_fini (diff) | |
download | linux-2af8f4a2727998eb3f4ff1edfffaca99955ef22e.tar.xz linux-2af8f4a2727998eb3f4ff1edfffaca99955ef22e.zip |
crypto: caam - coccicheck fixes
use true/false for bool, fix code alignment, and fix two allocs with
no test.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/key_gen.c')
-rw-r--r-- | drivers/crypto/caam/key_gen.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/crypto/caam/key_gen.c b/drivers/crypto/caam/key_gen.c index 002888185f17..f5c0d56764cc 100644 --- a/drivers/crypto/caam/key_gen.c +++ b/drivers/crypto/caam/key_gen.c @@ -54,6 +54,10 @@ u32 gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, int ret = 0; desc = kmalloc(CAAM_CMD_SZ * 6 + CAAM_PTR_SZ * 2, GFP_KERNEL | GFP_DMA); + if (!desc) { + dev_err(jrdev, "unable to allocate key input memory\n"); + return -ENOMEM; + } init_job_desc(desc, 0); |