From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: a.zummo@towertech.it, alexandre.belloni@free-electrons.com
Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: [V1] rtc:rtc-vr41xx :- Retunr error is not correct in rtc_probe
Date: Sun, 11 Dec 2016 22:11:24 +0530 [thread overview]
Message-ID: <1481474484-1316-1-git-send-email-arvind.yadav.cs@gmail.com> (raw)
Here, rtc_probe is returning EBUSY at any error case.
It should return ENOMEM insted of EBUSY.
-EBUSY A resource you need is not avaialable.
-ENOMEM This is used to signify lack of memory resources.
-ENODEV This is used when no device is available.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/rtc/rtc-vr41xx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c
index e1b86bb..e666d8e 100644
--- a/drivers/rtc/rtc-vr41xx.c
+++ b/drivers/rtc/rtc-vr41xx.c
@@ -292,21 +292,21 @@ static int rtc_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
- return -EBUSY;
+ return -ENOMEM;
rtc1_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
if (!rtc1_base)
- return -EBUSY;
+ return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
if (!res) {
- retval = -EBUSY;
+ retval = -ENOMEM;
goto err_rtc1_iounmap;
}
rtc2_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
if (!rtc2_base) {
- retval = -EBUSY;
+ retval = -ENOMEM;
goto err_rtc1_iounmap;
}
@@ -342,7 +342,7 @@ static int rtc_probe(struct platform_device *pdev)
pie_irq = platform_get_irq(pdev, 1);
if (pie_irq <= 0) {
- retval = -EBUSY;
+ retval = -ENODEV;
goto err_iounmap_all;
}
--
2.7.4
reply other threads:[~2016-12-11 16:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481474484-1316-1-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®