From: Chanwoo Choi <cw00.choi@samsung.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
krzk@kernel.org, b.zolnierkie@samsung.com, a.zummo@towertech.it,
alexandre.belloni@bootlin.com
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] rtc: max77686: Fix the returned value in case of error in 'max77686_rtc_read_time()'
Date: Wed, 14 Nov 2018 09:09:17 +0900 [thread overview]
Message-ID: <5BEB67AD.30800@samsung.com> (raw)
In-Reply-To: <20181113233645.9118-1-christophe.jaillet@wanadoo.fr>
On 2018년 11월 14일 08:36, Christophe JAILLET wrote:
> In case of error, we return 0.
> This is spurious and not consistent with the other functions of the driver.
> Commit e115a2bf1426 has modified more than what is said in the commit
> message. Reverse part of it znd return an error when needed, as it was
> previously.
>
> Fixes: e115a2bf1426 ("rtc: max77686: stop validating rtc_time in .read_time")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> 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 8a60900d6b8b..4aff349ae301 100644
> --- a/drivers/rtc/rtc-max77686.c
> +++ b/drivers/rtc/rtc-max77686.c
> @@ -360,7 +360,7 @@ static int max77686_rtc_read_time(struct device *dev, struct rtc_time *tm)
>
> out:
> mutex_unlock(&info->lock);
> - return 0;
> + return ret;
> }
>
> static int max77686_rtc_set_time(struct device *dev, struct rtc_time *tm)
>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
next prev parent reply other threads:[~2018-11-14 0:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20181113233753epcas4p2ecc97f5931a34bc0d176111b155738b8@epcas4p2.samsung.com>
2018-11-13 23:36 ` [PATCH] rtc: max77686: Fix the returned value in case of error in 'max77686_rtc_read_time()' Christophe JAILLET
2018-11-14 0:09 ` Chanwoo Choi [this message]
2018-11-14 11:03 ` Alexandre Belloni
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=5BEB67AD.30800@samsung.com \
--to=cw00.choi@samsung.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=b.zolnierkie@samsung.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/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).