From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com. [210.118.77.13]) by gmr-mx.google.com with ESMTPS id ui7si440726pab.0.2016.01.21.16.51.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 21 Jan 2016 16:51:45 -0800 (PST) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O1B00JXJX24A650@mailout3.w1.samsung.com> for rtc-linux@googlegroups.com; Fri, 22 Jan 2016 00:51:40 +0000 (GMT) Subject: [rtc-linux] Re: [PATCH v2 01/10] rtc: max77686: Fix max77686_rtc_read_alarm() return value To: Javier Martinez Canillas , linux-kernel@vger.kernel.org References: <1453407813-14646-1-git-send-email-javier@osg.samsung.com> <1453407813-14646-2-git-send-email-javier@osg.samsung.com> Cc: Kukjin Kim , rtc-linux@googlegroups.com, Chanwoo Choi , Alexandre Belloni , Laxman Dewangan , linux-samsung-soc@vger.kernel.org From: Krzysztof Kozlowski Message-id: <56A17D1F.5030802@samsung.com> Date: Fri, 22 Jan 2016 09:51:43 +0900 MIME-version: 1.0 In-reply-to: <1453407813-14646-2-git-send-email-javier@osg.samsung.com> Content-type: text/plain; charset=UTF-8 Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , On 22.01.2016 05:23, Javier Martinez Canillas wrote: > 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 > Signed-off-by: Javier Martinez Canillas > --- > > 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) Reviewed-by: Krzysztof Kozlowski Tested on Trats2 board with max77686: Tested-by: Krzysztof Kozlowski Best regards, Krzysztof -- -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Krzysztof Kozlowski Subject: Re: [PATCH v2 01/10] rtc: max77686: Fix max77686_rtc_read_alarm() return value Date: Fri, 22 Jan 2016 09:51:43 +0900 Message-ID: <56A17D1F.5030802@samsung.com> References: <1453407813-14646-1-git-send-email-javier@osg.samsung.com> <1453407813-14646-2-git-send-email-javier@osg.samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <1453407813-14646-2-git-send-email-javier@osg.samsung.com> Sender: linux-kernel-owner@vger.kernel.org To: Javier Martinez Canillas , linux-kernel@vger.kernel.org Cc: Kukjin Kim , rtc-linux@googlegroups.com, Chanwoo Choi , Alexandre Belloni , Laxman Dewangan , linux-samsung-soc@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org On 22.01.2016 05:23, Javier Martinez Canillas wrote: > 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 > Signed-off-by: Javier Martinez Canillas > --- > > 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) Reviewed-by: Krzysztof Kozlowski Tested on Trats2 board with max77686: Tested-by: Krzysztof Kozlowski Best regards, Krzysztof