summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-04-15 16:37:50 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:43:17 -0800
commit0489b1a6ba6881a2254107a5e7b297b08cd8396e (patch)
tree13c91eabdfeb97d73aab1d56c604df9329ad3fe5 /drivers/tty
parenta9dc69739c32b574300e3ceeab42ea49cd7d4ab7 (diff)
i2c/serial: tegra: Fixing pointer check returned from clk_get
The clk_get() api returns valid pointer in case of scucess otherwise returns error pointer. Hence checking the retrun pointer using macro IS_ERR_OR_NULL() to detect any error. Original-Change-Id: I92a62dc2c22c243e2aa35d7a10f88b6170b02f34 Reviewed-on: http://git-master/r/27876 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: I402141a3230b35292bdd31f9c0a7fb3bf261cbee Rebase-Id: R9d5306d715004a6963a85059f13f97c34a5cc06e
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/tegra_hsuart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/tegra_hsuart.c b/drivers/tty/serial/tegra_hsuart.c
index 3efa1a6632c9..76b7a79d0708 100644
--- a/drivers/tty/serial/tegra_hsuart.c
+++ b/drivers/tty/serial/tegra_hsuart.c
@@ -1312,7 +1312,7 @@ static int tegra_uart_probe(struct platform_device *pdev)
u->regshift = 2;
t->clk = clk_get(&pdev->dev, NULL);
- if (!t->clk) {
+ if (IS_ERR_OR_NULL(t->clk)) {
dev_err(&pdev->dev, "Couldn't get the clock\n");
goto fail;
}