summaryrefslogtreecommitdiff
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorRicardo Silva <rjpdasilva@gmail.com>2017-05-15 16:40:16 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-06 09:13:06 -0300
commitda731edb5b7667d0752eeaf473896fc123b8e95f (patch)
tree9601fe6e4ef0fad486c9ad8718ff4b91251663bf /drivers/staging/media
parentd44e07c752ecfed1fb131cd0c5f103e299c22ab4 (diff)
[media] lirc_zilog: Fix unbalanced braces around if/else
Fix all checkpatch reported issues for: * CHECK: "braces {} should be used on all arms of this statement". * CHECK: "Unbalanced braces around else statement". Make sure all if/else statements are balanced in terms of braces. Most cases in code are, but a few were left unbalanced, so put them all consistent with the recommended style. Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/lirc/lirc_zilog.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c
index 48628bab62fc..015e41bd036e 100644
--- a/drivers/staging/media/lirc/lirc_zilog.c
+++ b/drivers/staging/media/lirc/lirc_zilog.c
@@ -545,9 +545,9 @@ static int get_key_data(unsigned char *buf,
if (!read_uint32(&data, tx_data->endp, &i))
goto corrupt;
- if (i == codeset)
+ if (i == codeset) {
break;
- else if (codeset > i) {
+ } else if (codeset > i) {
base = pos + 1;
--lim;
}
@@ -981,8 +981,9 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key)
"failed to get data for code %u, key %u -- check lircd.conf entries\n",
code, key);
return ret;
- } else if (ret != 0)
+ } else if (ret != 0) {
return ret;
+ }
/* Send the data block */
ret = send_data_block(tx, data_block);
@@ -1179,8 +1180,9 @@ static ssize_t write(struct file *filep, const char __user *buf, size_t n,
schedule_timeout((100 * HZ + 999) / 1000);
tx->need_boot = 1;
++failures;
- } else
+ } else {
i += sizeof(int);
+ }
}
/* Release i2c bus */