summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJubeom Kim <jubeomk@nvidia.com>2011-06-22 21:46:42 +0900
committerRohan Somvanshi <rsomvanshi@nvidia.com>2011-06-24 02:55:35 -0700
commit851ffd0a30cbe67a5033a9792825b319f0bcd7ed (patch)
treec7d274b0db16dc74d98f5580d75550f32b7c4c0f
parent6643460bd1fa0b8cdf9ddfc75dd3dd228093819f (diff)
crypto: tegra-aes: replace dev_err and add NULL checking
Changed dev_err to pr_err because 'dd' can be NULL. Added NULL checking before clock disable of engine->pclk Change-Id: Ib631ec0b5411d00c0646bc641053e27b2f064480 Reviewed-on: http://git-master/r/37857 Tested-by: Jubeom Kim <jubeomk@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
-rw-r--r--drivers/crypto/tegra-aes.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c
index c36aecc2cce4..c4990dd504cb 100644
--- a/drivers/crypto/tegra-aes.c
+++ b/drivers/crypto/tegra-aes.c
@@ -307,7 +307,8 @@ static int aes_hw_init(struct tegra_aes_engine *engine)
if (ret < 0) {
dev_err(dd->dev, "%s: iclock enable fail(%d)\n",
__func__, ret);
- clk_disable(engine->pclk);
+ if (engine->pclk)
+ clk_disable(engine->pclk);
return ret;
}
}
@@ -661,7 +662,7 @@ static int tegra_aes_setkey(struct crypto_ablkcipher *tfm, const u8 *key,
struct tegra_aes_slot *key_slot;
if (!ctx || !dd) {
- dev_err(dd->dev, "ctx=0x%x, dd=0x%x\n",
+ pr_err("ctx=0x%x, dd=0x%x\n",
(unsigned int)ctx, (unsigned int)dd);
return -EINVAL;
}