summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/lgdt3306a.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-10-28 15:05:35 +0100
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-03-03 14:34:14 +0100
commitb4e43e959b45549a1d5341d89571fb4d8d03b736 (patch)
tree4a2505361f0f972b521babea2a04c546eb215615 /drivers/media/dvb-frontends/lgdt3306a.c
parent[media] lbdt3306a: simplify the lock status check (diff)
downloadlinux-b4e43e959b45549a1d5341d89571fb4d8d03b736.tar.xz
linux-b4e43e959b45549a1d5341d89571fb4d8d03b736.zip
[media] lgdt3306a: Don't use else were not needed
Get rid of the remaining checkpatch.pl warnings: WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/lgdt3306a.c')
-rw-r--r--drivers/media/dvb-frontends/lgdt3306a.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/drivers/media/dvb-frontends/lgdt3306a.c
index 0356810da444..38b64b2c745c 100644
--- a/drivers/media/dvb-frontends/lgdt3306a.c
+++ b/drivers/media/dvb-frontends/lgdt3306a.c
@@ -1125,10 +1125,9 @@ static enum lgdt3306a_modulation lgdt3306a_check_oper_mode(struct lgdt3306a_stat
if (val & 0x01) {
dbg_info("QAM256\n");
return LG3306_QAM256;
- } else {
- dbg_info("QAM64\n");
- return LG3306_QAM64;
}
+ dbg_info("QAM64\n");
+ return LG3306_QAM64;
}
err:
pr_warn("UNKNOWN\n");
@@ -1399,14 +1398,15 @@ static u32 log10_x1000(u32 x)
if (x <= 0)
return -1000000; /* signal error */
+ if (x == 10)
+ return 0; /* log(1)=0 */
+
if (x < 10) {
while (x < 10) {
x = x * 10;
log_val--;
}
- } else if (x == 10) {
- return 0; /* log(1)=0 */
- } else {
+ } else { /* x > 10 */
while (x >= 100) {
x = x / 10;
log_val++;