From 9180fb4c4907f1476bc8ee1459d2954a7a93371c Mon Sep 17 00:00:00 2001 From: Berne Hebark Date: Tue, 25 Oct 2011 14:17:01 +0200 Subject: crypto: ux500: hash: Coverity correction Coverity found invalid usage of device_data->dev. ST-Ericsson ID: 361610 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I78e756eb36af833e6620d0b02eda25c36741c94a Signed-off-by: Berne Hebark Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36480 Reviewed-by: QATOOLS Reviewed-by: QABUILD --- drivers/crypto/ux500/hash/hash_core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c index b2a58dccf76..04546ddbbd1 100644 --- a/drivers/crypto/ux500/hash/hash_core.c +++ b/drivers/crypto/ux500/hash/hash_core.c @@ -1173,11 +1173,10 @@ int hash_hw_update(struct ahash_request *req) /* Check if ctx->state.length + msg_length overflows */ - if (msg_length > - (ctx->state.length.low_word + msg_length) - && HASH_HIGH_WORD_MAX_VAL == - (ctx->state.length.high_word)) { - dev_err(device_data->dev, "[%s] HASH_MSG_LENGTH_OVERFLOW!", + if (msg_length > (ctx->state.length.low_word + msg_length) && + HASH_HIGH_WORD_MAX_VAL == + ctx->state.length.high_word) { + pr_err(DEV_DBG_NAME " [%s] HASH_MSG_LENGTH_OVERFLOW!", __func__); return -EPERM; } @@ -1349,7 +1348,7 @@ int hash_check_hw(struct hash_device_data *device_data) if (NULL == device_data) { ret = -EPERM; - dev_err(device_data->dev, "[%s] HASH_INVALID_PARAMETER!", + pr_err(DEV_DBG_NAME " [%s] HASH_INVALID_PARAMETER!", __func__); goto out; } -- cgit v1.2.3