summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorJubeom Kim <jubeomk@nvidia.com>2011-06-22 21:46:42 +0900
committerVarun Colbert <vcolbert@nvidia.com>2011-07-01 10:39:54 -0700
commit3195cad71daf5b0e4a1ab9d49f8ec91810db3d4a (patch)
tree5b0104e809c5ec31fc425b939dee9d3666f13aeb /drivers/crypto
parent8addd6ce75d780b13ff600902aef5852ce4680f4 (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 Reviewed-on: http://git-master/r/37857 (cherry picked from commit 851ffd0a30cbe67a5033a9792825b319f0bcd7ed) Change-Id: If5a2bbd550f3dc038b42d8a185647d02df9cb593 Reviewed-on: http://git-master/r/38446 Tested-by: Jubeom Kim <jubeomk@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/crypto')
-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 55b7c0dd61ac..dab01ef44bb5 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;
}