From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Richard Purdie <rpurdie@rpsys.net>,
Jacek Anaszewski <j.anaszewski@samsung.com>,
Lee Jones <lee.jones@linaro.org>,
Sebastian Reichel <sre@kernel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-input@vger.kernel.org, linux-leds@vger.kernel.org,
linux-pm@vger.kernel.org, rtc-linux@googlegroups.com
Cc: r.baldyga@hackerion.com,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: [RESEND v7 4/6] extcon: max8997: Fix handling error code of regmap_irq_get_virq()
Date: Fri, 17 Jun 2016 08:10:31 +0200 [thread overview]
Message-ID: <1466143833-5856-5-git-send-email-k.kozlowski@samsung.com> (raw)
In-Reply-To: <1466143833-5856-1-git-send-email-k.kozlowski@samsung.com>
The regmap_irq_get_virq() can return negative ERRNO, so its result
should not be stored in unsigned int because error would be ignored.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/extcon/extcon-max8997.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
index 68754ac2c8ea..0afa3e8b5dc3 100644
--- a/drivers/extcon/extcon-max8997.c
+++ b/drivers/extcon/extcon-max8997.c
@@ -660,11 +660,11 @@ static int max8997_muic_probe(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(muic_irqs); i++) {
struct max8997_muic_irq *muic_irq = &muic_irqs[i];
- unsigned int virq = 0;
+ int virq = 0;
virq = regmap_irq_get_virq(max8997->irq_data_muic,
muic_irq->irq);
- if (!virq) {
+ if (virq <= 0) {
ret = -EINVAL;
goto err_irq;
}
--
1.9.1
next prev parent reply other threads:[~2016-06-17 6:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 6:10 [RESEND v7 0/6] regulator: mfd: max8997: Add regmap Krzysztof Kozlowski
2016-06-17 6:10 ` [RESEND v7 1/6] mfd: max8997: Use regmap to access registers Krzysztof Kozlowski
2016-06-17 7:53 ` Lee Jones
2016-06-17 12:59 ` Mark Brown
2016-06-17 6:10 ` [RESEND v7 2/6] mfd: max8997: handle IRQs using regmap Krzysztof Kozlowski
2016-06-17 6:10 ` [RESEND v7 3/6] mfd: max8997: Change irq names to upper case Krzysztof Kozlowski
2016-06-17 6:10 ` Krzysztof Kozlowski [this message]
2016-06-17 6:10 ` [RESEND v7 5/6] rtc: max8997: Check for ERRNO of regmap_irq_get_virq() Krzysztof Kozlowski
2016-06-17 6:10 ` [RESEND v7 6/6] extcon: max8997: Fix inconsistent indenting Krzysztof Kozlowski
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=1466143833-5856-5-git-send-email-k.kozlowski@samsung.com \
--to=k.kozlowski@samsung.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=b.zolnierkie@samsung.com \
--cc=broonie@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=dbaryshkov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=j.anaszewski@samsung.com \
--cc=kgene@kernel.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=r.baldyga@hackerion.com \
--cc=rpurdie@rpsys.net \
--cc=rtc-linux@googlegroups.com \
--cc=sre@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).