From 0489b1a6ba6881a2254107a5e7b297b08cd8396e Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 15 Apr 2011 16:37:50 +0530 Subject: 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 Tested-by: Laxman Dewangan Reviewed-by: Scott Williams Original-Change-Id: I402141a3230b35292bdd31f9c0a7fb3bf261cbee Rebase-Id: R9d5306d715004a6963a85059f13f97c34a5cc06e --- drivers/tty/serial/tegra_hsuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/tty') 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; } -- cgit v1.2.3