All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: asm9260: add the missed check for devm_clk_get
@ 2019-12-14  7:45 Chuhong Yuan
  2019-12-23 10:07 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Chuhong Yuan @ 2019-12-14  7:45 UTC (permalink / raw)
  Cc: Alessandro Zummo, Alexandre Belloni, linux-rtc, linux-kernel,
	Chuhong Yuan

The driver misses a check for devm_clk_get().
Add the check to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
 drivers/rtc/rtc-asm9260.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c
index 10064bdabdff..3ab81cdec00b 100644
--- a/drivers/rtc/rtc-asm9260.c
+++ b/drivers/rtc/rtc-asm9260.c
@@ -264,6 +264,9 @@ static int asm9260_rtc_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->iobase);
 
 	priv->clk = devm_clk_get(dev, "ahb");
+	if (IS_ERR(priv->clk))
+		return PTR_ERR(priv->clk);
+
 	ret = clk_prepare_enable(priv->clk);
 	if (ret) {
 		dev_err(dev, "Failed to enable clk!\n");
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtc: asm9260: add the missed check for devm_clk_get
  2019-12-14  7:45 [PATCH] rtc: asm9260: add the missed check for devm_clk_get Chuhong Yuan
@ 2019-12-23 10:07 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2019-12-23 10:07 UTC (permalink / raw)
  To: Chuhong Yuan; +Cc: Alessandro Zummo, linux-rtc, linux-kernel

On 14/12/2019 15:45:28+0800, Chuhong Yuan wrote:
> The driver misses a check for devm_clk_get().
> Add the check to fix it.
> 
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
>  drivers/rtc/rtc-asm9260.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-23 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-14  7:45 [PATCH] rtc: asm9260: add the missed check for devm_clk_get Chuhong Yuan
2019-12-23 10:07 ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.