diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-12-14 15:45:28 +0800 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-12-23 11:16:23 +0100 |
commit | 62cbe63f58e774473214a02579d1745d7a85f0c1 (patch) | |
tree | 3548bf90b8c6c0d6f1173bbee4855ff7170e1432 /drivers/rtc | |
parent | bd0d937928d4696c9480d972cb09ec154bc2f6b0 (diff) | |
download | linux-62cbe63f58e774473214a02579d1745d7a85f0c1.tar.gz linux-62cbe63f58e774473214a02579d1745d7a85f0c1.tar.bz2 linux-62cbe63f58e774473214a02579d1745d7a85f0c1.zip |
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')
-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"); |