[9610] bts: fixes prevent defects (CID 214778,214779,214783,214904)
authorTaekki Kim <taekki.kim@samsung.com>
Tue, 9 Jan 2018 10:35:39 +0000 (19:35 +0900)
committerJaehyoung Choi <jkkkkk.choi@samsung.com>
Fri, 11 May 2018 05:16:44 +0000 (14:16 +0900)
Change-Id: I0b7445d9e2b4ea902e373f1dfc09f727d8b30c29
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
drivers/bts/bts-exynos9610.c

index 078ddecfdb255cb0dcf35d76a650197d92bd18f4..f2ce5406d418a2c6dcae3f7de5646c775b1baabe 100644 (file)
@@ -1535,7 +1535,7 @@ static ssize_t exynos_dmc_timeout_write(struct file *file, const char __user *us
        }
 
        if (drex_ip < 0 || drex_ip > nr_drex || scen < 0 ||
-                       scen > nr_scen || qos < 0 || timeout < 0) {
+                       scen > nr_scen || qos < 0 || qos > BTS_PRIORITY_MAX) {
                pr_err("Invalid variable\n");
                goto out;
        }
@@ -2338,7 +2338,7 @@ static ssize_t exynos_vc_timer_th_write(struct file *file, const char __user *us
        }
 
        if (drex_ip < 0 || drex_ip > nr_drex || scen < 0 ||
-                       scen > nr_scen || qos < 0 || threshold < 0) {
+                       scen > nr_scen || qos < 0 || qos > BTS_PRIORITY_MAX) {
                pr_err("Invalid variable\n");
                goto out;
        }
@@ -2847,7 +2847,7 @@ static ssize_t exynos_pf_qos_timer_write(struct file *file, const char __user *u
        }
 
        if (drex_pf_ip < 0 || drex_pf_ip > nr_drex_pf || scen < 0 ||
-                       scen > nr_scen || qos < 0 || timeout < 0) {
+                       scen > nr_scen || qos < 0 || qos > BTS_PRIORITY_MAX) {
                pr_err("Invalid variable\n");
                goto out;
        }