diff options
author | Paul Cercueil <paul@crapouillou.net> | 2020-05-06 00:13:35 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2020-05-11 16:35:03 +0200 |
commit | 15eeadd801c0ea65c44c01f243f45097ac5970a8 (patch) | |
tree | ece9181800317e000c15aaefe9886ced561a4546 /drivers/rtc | |
parent | 77d8f3c1226b2ae60b989568a102dd79a8b379f0 (diff) | |
download | linux-15eeadd801c0ea65c44c01f243f45097ac5970a8.tar.bz2 |
rtc: ingenic: Fix masking of error code
The code was returning -ENOENT on any error of platform_get_irq(), even
if it returned a different error.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20200505221336.222313-6-paul@crapouillou.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-jz4740.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index 3193eb8bd131..65e130726fc6 100644 --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c @@ -323,7 +323,7 @@ static int jz4740_rtc_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) - return -ENOENT; + return irq; rtc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rtc->base)) |