* Patch "rtc: max77686: Properly handle regmap_irq_get_virq() error code" has been added to the 4.4-stable tree
@ 2016-05-02 18:41 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-05-02 18:41 UTC (permalink / raw)
To: k.kozlowski, alexandre.belloni, gregkh, javier; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
rtc: max77686: Properly handle regmap_irq_get_virq() error code
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
rtc-max77686-properly-handle-regmap_irq_get_virq-error-code.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From fb166ba1d7f0a662f7332f4ff660a0d6f4d76915 Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Date: Thu, 4 Feb 2016 09:26:35 +0900
Subject: rtc: max77686: Properly handle regmap_irq_get_virq() error code
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
commit fb166ba1d7f0a662f7332f4ff660a0d6f4d76915 upstream.
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")
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/rtc/rtc-max77686.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -465,7 +465,7 @@ static int max77686_rtc_probe(struct pla
info->virq = regmap_irq_get_virq(max77686->rtc_irq_data,
MAX77686_RTCIRQ_RTCA1);
- if (!info->virq) {
+ if (info->virq <= 0) {
ret = -ENXIO;
goto err_rtc;
}
Patches currently in stable-queue which might be from k.kozlowski@samsung.com are
queue-4.4/pm-opp-initialize-u_volt_min-max-to-a-valid-value.patch
queue-4.4/i2c-exynos5-fix-possible-abba-deadlock-by-keeping-i2c-clock-prepared.patch
queue-4.4/rtc-max77686-properly-handle-regmap_irq_get_virq-error-code.patch
queue-4.4/asoc-s3c24xx-use-const-snd_soc_component_driver-pointer.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-02 18:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-02 18:41 Patch "rtc: max77686: Properly handle regmap_irq_get_virq() error code" has been added to the 4.4-stable tree gregkh
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).