diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2011-06-07 19:27:52 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2011-06-10 05:40:30 -0700 |
commit | f69d9be1947af12d634bf6a8da4fd44bdf58193d (patch) | |
tree | 68cb569086d5d9dc9d73a9fedd5b72fe48872c8f | |
parent | 9ee039ab788b4e3b29d3168ba773829e2505b911 (diff) |
crypto: tegra-aes: validate clk_get return values
instead of checking for NULL, IS_ERR() should
be used to check the validity of a clock handle
Change-Id: Ic0ef30c64f4bd95995dcde048cd7630e2d75cd92
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/35619
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r-- | drivers/crypto/tegra-aes.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index 3d1bf4f93d23..21461172171c 100644 --- a/drivers/crypto/tegra-aes.c +++ b/drivers/crypto/tegra-aes.c @@ -1134,29 +1134,29 @@ static int tegra_aes_probe(struct platform_device *pdev) dd->bsea.res_id = TEGRA_ARB_BSEA; dd->bsev.pclk = clk_get(dev, "bsev"); - if (!dd->bsev.pclk) { - dev_err(dev, "pclock intialization failed.\n"); + if (IS_ERR(dd->bsev.pclk)) { + dev_err(dev, "v: pclock intialization failed.\n"); err = -ENODEV; goto out; } dd->bsev.iclk = clk_get(dev, "vde"); - if (!dd->bsev.iclk) { - dev_err(dev, "iclock intialization failed.\n"); + if (IS_ERR(dd->bsev.iclk)) { + dev_err(dev, "v: iclock intialization failed.\n"); err = -ENODEV; goto out; } dd->bsea.pclk = clk_get(dev, "bsea"); - if (!dd->bsea.pclk) { - dev_err(dev, "pclock intialization failed.\n"); + if (IS_ERR(dd->bsea.pclk)) { + dev_err(dev, "a: pclock intialization failed.\n"); err = -ENODEV; goto out; } dd->bsea.iclk = clk_get(dev, "sclk"); - if (!dd->bsea.iclk) { - dev_err(dev, "iclock intialization failed.\n"); + if (IS_ERR(dd->bsea.iclk)) { + dev_err(dev, "a: iclock intialization failed.\n"); err = -ENODEV; goto out; } |