[media] lgdt3306a: Don't use else were not needed
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Oct 2014 14:05:35 +0000 (12:05 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 3 Mar 2015 13:34:14 +0000 (10:34 -0300)
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>
drivers/media/dvb-frontends/lgdt3306a.c

index 0356810da444be5ce4ce40dfabc8b4b74fcfb031..38b64b2c745c54240b54059524c6fb6ee7ab75e6 100644 (file)
@@ -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++;
This page took 0.042243 seconds and 5 git commands to generate.