summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-tegra.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-09-21 12:12:09 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-10-16 12:56:56 +0200
commitfe0b5cedc2b73c9b005e1812c0ae5b922a96243a (patch)
tree2ee9aafab4c2a7c7eac3d01b2604962d9404662f /drivers/rtc/rtc-tegra.c
parentbc51098cdd9573bfdecfd02fc8ed474419d73ea0 (diff)
downloadlinux-fe0b5cedc2b73c9b005e1812c0ae5b922a96243a.tar.gz
linux-fe0b5cedc2b73c9b005e1812c0ae5b922a96243a.tar.bz2
linux-fe0b5cedc2b73c9b005e1812c0ae5b922a96243a.zip
rtc: tegra: Propagate errors from platform_get_irq()
Instead of confusingly returning -EBUSY on failure to obtain an interrupt, propagate the real error code. While at it, let the user know why the interrupt could not be acquired. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-tegra.c')
-rw-r--r--drivers/rtc/rtc-tegra.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index 8dc48fe7fc35..c9e77a83cd1b 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -322,9 +322,13 @@ static int __init tegra_rtc_probe(struct platform_device *pdev)
if (IS_ERR(info->rtc_base))
return PTR_ERR(info->rtc_base);
- info->tegra_rtc_irq = platform_get_irq(pdev, 0);
- if (info->tegra_rtc_irq <= 0)
- return -EBUSY;
+ ret = platform_get_irq(pdev, 0);
+ if (ret <= 0) {
+ dev_err(&pdev->dev, "failed to get platform IRQ: %d\n", ret);
+ return ret;
+ }
+
+ info->tegra_rtc_irq = ret;
info->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(info->clk))