From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:51556 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755107AbcEBSlw (ORCPT ); Mon, 2 May 2016 14:41:52 -0400 Subject: Patch "rtc: max77686: Properly handle regmap_irq_get_virq() error code" has been added to the 4.4-stable tree To: k.kozlowski@samsung.com, alexandre.belloni@free-electrons.com, gregkh@linuxfoundation.org, javier@osg.samsung.com Cc: , From: Date: Mon, 02 May 2016 11:41:50 -0700 Message-ID: <146221451010011@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From fb166ba1d7f0a662f7332f4ff660a0d6f4d76915 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 4 Feb 2016 09:26:35 +0900 Subject: rtc: max77686: Properly handle regmap_irq_get_virq() error code From: Krzysztof Kozlowski 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 Fixes: 6f1c1e71d933 ("mfd: max77686: Convert to use regmap_irq") Reviewed-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni Signed-off-by: Greg Kroah-Hartman --- 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