diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-12-14 10:45:28 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-12-23 13:16:23 +0300 |
commit | 62cbe63f58e774473214a02579d1745d7a85f0c1 (patch) | |
tree | 3548bf90b8c6c0d6f1173bbee4855ff7170e1432 /drivers/rtc/rtc-asm9260.c | |
parent | bd0d937928d4696c9480d972cb09ec154bc2f6b0 (diff) | |
download | linux-62cbe63f58e774473214a02579d1745d7a85f0c1.tar.xz |
rtc: asm9260: add the missed check for devm_clk_get
The driver misses a check for devm_clk_get().
Add the check to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20191214074528.16806-1-hslester96@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-asm9260.c')
-rw-r--r-- | drivers/rtc/rtc-asm9260.c | 3 |
1 files changed, 3 insertions, 0 deletions
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"); |