diff options
author | Jubeom Kim <jubeomk@nvidia.com> | 2011-06-22 21:46:42 +0900 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-07-18 19:14:09 -0700 |
commit | 1667f75653a1f957f73a8439f1eca479773a38e8 (patch) | |
tree | c37464044af767133c2747e1f7cde0d0decf6ca1 | |
parent | 0e48677851aa5e9c80aa1f13e5b3c7d3e81408d9 (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: Ib6d688432b89d37eb9b388b364303850afe94d53
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/41510
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
-rw-r--r-- | drivers/crypto/tegra-aes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index 2d46ed8fc29a..13fcc925ef94 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; } |