]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00253835: CAAM: Fix build warnings in caamhash.c
authorTerry Lv <r65388@freescale.com>
Tue, 12 Mar 2013 05:45:28 +0000 (13:45 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:57 +0000 (08:35 +0200)
A warning was find in caamhash.c:
linux-2.6-imx/drivers/crypto/caam/caamhash.c: In function
'ahash_update_ctx':
linux-2.6-imx/drivers/crypto/caam/caamhash.c:850: warning: 'desc' may be
used uninitialized in this function

This commit is to fix it.

Signed-off-by: Terry Lv <r65388@freescale.com>
drivers/crypto/caam/caamhash.c

index 03daad6b4b684016201a84a2ad2a9a57bde32c3f..43380476b2304a4ced2977551a2522548f88c4a9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * caam - Freescale FSL CAAM support for ahash functions of crypto API
  *
- * Copyright (C) 2011-2012 Freescale Semiconductor, Inc.
+ * Copyright (C) 2011-2013 Freescale Semiconductor, Inc.
  *
  * Based on caamalg.c crypto API driver.
  *
@@ -807,7 +807,7 @@ static int ahash_update_ctx(struct ahash_request *req)
        int *next_buflen = state->current_buf ? &state->buflen_0 :
                           &state->buflen_1, last_buflen;
        int in_len = *buflen + req->nbytes, to_hash;
-       u32 *sh_desc = ctx->sh_desc_update, *desc;
+       u32 *sh_desc = ctx->sh_desc_update, *desc = NULL;
        dma_addr_t ptr = ctx->sh_desc_update_dma;
        int src_nents, sec4_sg_bytes, sec4_sg_src_index;
        struct ahash_edesc *edesc;