summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFernando Guzman Lugo <fernando.guzman.lugo@intel.com>2015-06-11 10:39:46 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-12 17:39:50 -0700
commitff0daa1c1a28c9866d735852a1cbfb9c757aaa7b (patch)
tree9281508e59138fc2844d277a6630e39095994c55 /drivers
parent899f0c1c7dbcc487fdc8756a49ff70b1d5d75f89 (diff)
downloadlinux-ff0daa1c1a28c9866d735852a1cbfb9c757aaa7b.tar.gz
linux-ff0daa1c1a28c9866d735852a1cbfb9c757aaa7b.tar.bz2
linux-ff0daa1c1a28c9866d735852a1cbfb9c757aaa7b.zip
serial: sprd: check for NULL after calling devm_clk_get
In platforms which does not use CLK framework (HAVE_CLK not set), the clk_* functions return NULL instead of an error. This patch handles that scenario. Signed-off-by: Fernando Guzman Lugo <fernando.guzman.lugo@intel.com> Signed-off-by: Chunyan Zhang <chunyan.zhang@spreadtrum.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/sprd_serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
index 582d2729f700..3866516c2926 100644
--- a/drivers/tty/serial/sprd_serial.c
+++ b/drivers/tty/serial/sprd_serial.c
@@ -716,7 +716,7 @@ static int sprd_probe(struct platform_device *pdev)
up->flags = UPF_BOOT_AUTOCONF;
clk = devm_clk_get(&pdev->dev, NULL);
- if (!IS_ERR(clk))
+ if (!IS_ERR_OR_NULL(clk))
up->uartclk = clk_get_rate(clk);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);