linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com,
	ldewangan@nvidia.com, javier@osg.samsung.com
Subject: Re: [PATCH] rtc: max77686: Properly handle regmap_irq_get_virq() error code
Date: Thu, 4 Feb 2016 23:49:06 +0100	[thread overview]
Message-ID: <20160204224906.GD4782@piout.net> (raw)
In-Reply-To: <1454545595-31725-1-git-send-email-k.kozlowski@samsung.com>

On 04/02/2016 at 09:26:35 +0900, Krzysztof Kozlowski wrote :
> The regmap_irq_get_virq() can return 0 or -EINVAL in error conditions
> but driver checked only for value of 0.
> 
> This could lead to a cast of -EINVAL to an unsigned int used as a
> interrupt number for devm_request_threaded_irq(). Although this is not
> yet fatal (devm_request_threaded_irq() will just fail with -EINVAL) but
> might be a misleading when diagnosing errors.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Fixes: 6f1c1e71d933 ("mfd: max77686: Convert to use regmap_irq")
> 
> ---
> 
> Patch rebased on current mainline, not RTC tree, because IMHO it is
> a candidate for current RC-cycle.
> 
> Not marking cc-stable because behavior is not fatal - unless there is
> an interrupt with number 4294967274 (then it would be successfully
> requested for RTC driver).
> ---
>  drivers/rtc/rtc-max77686.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

      parent reply	other threads:[~2016-02-04 22:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04  0:26 [PATCH] rtc: max77686: Properly handle regmap_irq_get_virq() error code Krzysztof Kozlowski
2016-02-04  2:47 ` Javier Martinez Canillas
2016-02-04 22:49 ` Alexandre Belloni [this message]

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=20160204224906.GD4782@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=a.zummo@towertech.it \
    --cc=cw00.choi@samsung.com \
    --cc=javier@osg.samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=ldewangan@nvidia.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;
as well as URLs for NNTP newsgroup(s).