From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: myungjoo.ham@samsung.com, patches@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal
Date: Mon, 4 Nov 2013 09:21:02 +0000 [thread overview]
Message-ID: <20131104092102.GC30879@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <5276EB32.9060803@samsung.com>
On Mon, Nov 04, 2013 at 09:32:50AM +0900, Chanwoo Choi wrote:
> The arizona_hpdet_do_id() return only either -EAGIN or 0(zero).
> extcon-arizona driver could never execute 'goto done;' statement.
>
> ret = arizona_hpdet_do_id(info, &reading, &mic);
> if (ret == -EAGAIN) {
> goto out;
> } else if (ret < 0) {
> goto done;
> }
True that else if is redundant at the moment, but personally I
would be inclined to leave it in, it feels safer against possible
future edits of arizona_hpdet_do_id. It would be reasonable for
someone to assume that other return values are acceptable whilst
editing it but they would then not be handled.
Thanks,
Charles
next prev parent reply other threads:[~2013-11-04 9:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-27 16:19 [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal Charles Keepax
2013-10-27 16:19 ` [PATCH 2/2] extcon: arizona: Fix race with microphone detection and removal Charles Keepax
2013-11-04 0:38 ` Chanwoo Choi
2013-11-04 9:11 ` Charles Keepax
2013-11-04 0:32 ` [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal Chanwoo Choi
2013-11-04 9:21 ` Charles Keepax [this message]
2013-11-04 9:41 ` Chanwoo Choi
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=20131104092102.GC30879@opensource.wolfsonmicro.com \
--to=ckeepax@opensource.wolfsonmicro.com \
--cc=cw00.choi@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=patches@opensource.wolfsonmicro.com \
/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).