diff options
author | Evgeny Budilovsky <budevg@gmail.com> | 2014-06-20 11:22:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-20 08:28:01 -0700 |
commit | 55a4ea71ca4225f723cca1c44da569bd4de9d739 (patch) | |
tree | 712c90d6bd8f8284bcf7862c67fa15fd35bc756e /drivers/staging/cptm1217/clearpad_tm1217.c | |
parent | 2a838c6484e13da6f1bfe093d7300d02daca80d1 (diff) | |
download | linux-55a4ea71ca4225f723cca1c44da569bd4de9d739.tar.bz2 |
staging/cptm1217: fix checkpatch warnings about else clause
Signed-off-by: Evgeny Budilovsky <budevg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/cptm1217/clearpad_tm1217.c')
-rw-r--r-- | drivers/staging/cptm1217/clearpad_tm1217.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/staging/cptm1217/clearpad_tm1217.c b/drivers/staging/cptm1217/clearpad_tm1217.c index ca4c2c67dd88..edf9ff2ea25b 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); |