MLK-20216-5: video/fbdev/mxc_dcic: remove needless comparison
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Wed, 14 Nov 2018 13:01:30 +0000 (15:01 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
This fixes less-then-zero comparison Coverity issue. roi_param->roi_n is
unsigned, hence the comparison is not needed.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
drivers/video/fbdev/mxc/mxc_dcic.c

index e4393df..214ff90 100644 (file)
@@ -230,7 +230,7 @@ static bool roi_configure(struct dcic_data *dcic, struct roi_params *roi_param)
        struct roi_regs *roi_reg;
        u32 val;
 
-       if (roi_param->roi_n < 0 || roi_param->roi_n >= 16) {
+       if (roi_param->roi_n >= 16) {
                printk(KERN_ERR "Error, Wrong ROI number %d\n", roi_param->roi_n);
                return false;
        }