diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2011-06-07 19:27:52 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-07-18 19:08:22 -0700 |
commit | 4570a6f5d2fc9f7e8a80e0e9a8f31394d600006d (patch) | |
tree | ebc08ef7cc949d50f513427b244bc0472b6f4f85 | |
parent | 22dcde265557f1e37d0dc664ed55ca8d987e8222 (diff) |
crypto: tegra-aes: validate clk_get return values
instead of checking for NULL, IS_ERR_OR_NULL() should
be used to check the validity of a clock handle
Reviewed-on: http://git-master/r/35619
(cherry picked from commit f69d9be1947af12d634bf6a8da4fd44bdf58193d)
Change-Id: Id33535b01e8591b0ab580def009c737278b72717
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/41508
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..239d74dbbb9c 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_OR_NULL(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_OR_NULL(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_OR_NULL(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_OR_NULL(dd->bsea.iclk)) { + dev_err(dev, "a: iclock intialization failed.\n"); err = -ENODEV; goto out; } |