Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1162969 > unrolled thread
| Started by | Chunyan Zhang <chunyan.zhang@spreadtrum.com> |
|---|---|
| First post | 2015-06-11 04:50 +0200 |
| Last post | 2015-06-11 04:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] serial: sprd: check for NULL after calling devm_clk_get Chunyan Zhang <chunyan.zhang@spreadtrum.com> - 2015-06-11 04:50 +0200
| From | Chunyan Zhang <chunyan.zhang@spreadtrum.com> |
|---|---|
| Date | 2015-06-11 04:50 +0200 |
| Subject | [PATCH] serial: sprd: check for NULL after calling devm_clk_get |
| Message-ID | <pA0J4-AO-5@gated-at.bofh.it> |
From: Fernando Guzman Lugo <fernando.guzman.lugo@intel.com> 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> --- drivers/tty/serial/sprd_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c index 582d272..3866516 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); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web