Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1318588

[PATCH v4 01/10] rtc: max77686: Fix max77686_rtc_read_alarm() return value

From Javier Martinez Canillas <javier@osg.samsung.com>
Newsgroups linux.kernel
Subject [PATCH v4 01/10] rtc: max77686: Fix max77686_rtc_read_alarm() return value
Date 2016-01-27 04:40 +0100
Message-ID <qVp7A-5OH-13@gated-at.bofh.it> (permalink)
References <qVp7A-5OH-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The function is always returning zero even in case of failures since
the ret value was not propagated to the callers. Fix the error path.

Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>

---

Changes in v4:
- Add Andi Shyti's Reviewed-by to patch #1.

Changes in v3:
- Add Krzysztof Kozlowski's Reviewed-by and Tested-by to patch #1.
- Add Laxman Dewangan's Acked-by tag to patch #1.

Changes in v2: None

 drivers/rtc/rtc-max77686.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 7184a0eda793..6653c3d11b66 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -235,7 +235,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 
 out:
 	mutex_unlock(&info->lock);
-	return 0;
+	return ret;
 }
 
 static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
-- 
2.5.0

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v4 01/10] rtc: max77686: Fix max77686_rtc_read_alarm() return value Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-27 04:40 +0100

csiph-web