From: Evgeny Budilovsky <budevg@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Cameron <jic23@kernel.org>,
Joe Perches <joe@perches.com>,
driverdev-devel@linuxdriverproject.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] staging/cptm1217: fix checkpatch warnings about else clause
Date: Fri, 20 Jun 2014 11:22:14 +0300 [thread overview]
Message-ID: <87zjh86iug.fsf@gmail.com> (raw)
Signed-off-by: Evgeny Budilovsky <budevg@gmail.com>
---
drivers/staging/cptm1217/clearpad_tm1217.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/cptm1217/clearpad_tm1217.c b/drivers/staging/cptm1217/clearpad_tm1217.c
index ca4c2c6..edf9ff2 100644
--- a/drivers/staging/cptm1217/clearpad_tm1217.c
+++ b/drivers/staging/cptm1217/clearpad_tm1217.c
@@ -147,12 +147,11 @@ static int cp_tm1217_read(struct cp_tm1217_device *ts,
msleep(WAIT_FOR_RESPONSE);
for (i = 0; i < MAX_RETRIES; i++) {
retval = i2c_master_recv(ts->client, &req[1], size);
- if (retval == size) {
+ if (retval == size)
break;
- } else {
- msleep(INCREMENTAL_DELAY);
- dev_dbg(ts->dev, "cp_tm1217: Retry count is %d\n", i);
- }
+
+ msleep(INCREMENTAL_DELAY);
+ dev_dbg(ts->dev, "cp_tm1217: Retry count is %d\n", i);
}
if (retval != size)
dev_err(ts->dev, "cp_tm1217: Read from device failed\n");
@@ -288,11 +287,11 @@ static irqreturn_t cp_tm1217_sample_thread(int irq, void *handle)
if (ts->thread_running == 1) {
mutex_unlock(&ts->thread_mutex);
return IRQ_HANDLED;
- } else {
- ts->thread_running = 1;
- mutex_unlock(&ts->thread_mutex);
}
+ ts->thread_running = 1;
+ mutex_unlock(&ts->thread_mutex);
+
/* Mask the interrupts */
retval = cp_tm1217_mask_interrupt(ts);
--
1.8.1.2
reply other threads:[~2014-06-20 9:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87zjh86iug.fsf@gmail.com \
--to=budevg@gmail.com \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=joe@perches.com \
--cc=linux-kernel@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