demux: fix coverity issue [1/1]
authorChuangcheng Peng <chuangcheng.peng@amlogic.com>
Tue, 23 Jun 2020 09:21:36 +0000 (17:21 +0800)
committerChuangcheng Peng <chuangcheng.peng@amlogic.com>
Sun, 28 Jun 2020 09:16:41 +0000 (02:16 -0700)
PD#SWPL-27559

Problem:
 coverity issue

Solution:
 fix coverity issue.

Verify:
 verify at ab301

Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
Change-Id: I1bae31769759a211a719ec8eec3611bade4233f9

drivers/stream_input/parser/hw_demux/aml_dvb.c
drivers/stream_input/parser/hw_demux/aml_dvb.h

index 0b80ae32b1411f315026336d9def6fe4e251ff7a..4f404312e936176e84b427fc6a7f40ae97cc529a 100644 (file)
@@ -2580,13 +2580,12 @@ error_fe:
                        s_tuner_type[i] = AM_TUNER_NONE;
                }
 
+               if (advb->tuners)
+                       kfree(advb->tuners);
+               pr_dbg("probe amlogic dvb driver [%s] Exit\n", DVB_VERSION);
                return 0;
        }
 
-       if (advb->tuners)
-               kfree(advb->tuners);
-       pr_dbg("probe amlogic dvb driver [%s] Exit\n", DVB_VERSION);
-       return 0;
 error:
        for (i = 0; i < advb->async_fifo_total_count; i++) {
                if (advb->asyncfifo[i].id != -1)
index 8370052cc3652f892e1b72072c6d70b5ebdb7259..25d5121bcec2afa4c1f2e7005b16433f70994519 100644 (file)
@@ -333,7 +333,7 @@ struct aml_dvb {
        int     ts_out_invert;
 
        unsigned int tuner_num;
-       unsigned int tuner_cur;
+       int tuner_cur;
        struct aml_tuner *tuners;
        bool tuner_attached;