aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/caam/desc_constr.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/caam/desc_constr.h')
-rw-r--r--drivers/crypto/caam/desc_constr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h
index 62ce6421bb3fe7..824c94d44f943d 100644
--- a/drivers/crypto/caam/desc_constr.h
+++ b/drivers/crypto/caam/desc_constr.h
@@ -163,7 +163,8 @@ static inline void append_data(u32 * const desc, const void *data, int len)
{
u32 *offset = desc_end(desc);
- if (len) /* avoid sparse warning: memcpy with byte count of 0 */
+ /* Avoid gcc warning: memcpy with data == NULL */
+ if (!IS_ENABLED(CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG) || data)
memcpy(offset, data, len);
(*desc) = cpu_to_caam32(caam32_to_cpu(*desc) +