[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1294749833-32019-9-git-send-email-jamie@jamieiles.com>
Date: Tue, 11 Jan 2011 12:43:45 +0000
From: Jamie Iles <jamie@...ieiles.com>
To: linux-kernel@...r.kernel.org
Cc: Jamie Iles <jamie@...ieiles.com>,
Kukjin Kim <kgene.kim@...sung.com>,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH 08/16] ARM: samsung: serial: don't treat NULL clk as an error
clk_get() returns a struct clk cookie to the driver and some platforms
may return NULL if they only support a single clock. clk_get() has only
failed if it returns a ERR_PTR() encoded pointer.
Cc: Kukjin Kim <kgene.kim@...sung.com>
Cc: linux-arm-kernel@...ts.infradead.org
Signed-off-by: Jamie Iles <jamie@...ieiles.com>
---
drivers/serial/samsung.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c
index 7ac2bf5..be93d2f 100644
--- a/drivers/serial/samsung.c
+++ b/drivers/serial/samsung.c
@@ -42,6 +42,7 @@
#include <linux/serial.h>
#include <linux/delay.h>
#include <linux/clk.h>
+#include <linux/err.h>
#include <linux/cpufreq.h>
#include <asm/irq.h>
@@ -522,7 +523,7 @@ static int s3c24xx_serial_calcbaud(struct baud_calc *calc,
unsigned long rate;
calc->src = clk_get(port->dev, clksrc->name);
- if (calc->src == NULL || IS_ERR(calc->src))
+ if (IS_ERR(calc->src))
return 0;
rate = clk_get_rate(calc->src);
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists