MLK-20216-6: video/fbdev/mxc_dcic: fix return value
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Wed, 14 Nov 2018 13:06:12 +0000 (15:06 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
This fixes Coverity issue where an unsigned variable is tested for
less-than-zero value.

Make val a signed integer instead.

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 214ff90..cab75e2 100644 (file)
@@ -360,7 +360,8 @@ static int dcic_release(struct inode *inode, struct file *file)
 
 static int dcic_init(struct device_node *np, struct dcic_data *dcic)
 {
-       u32 val, bus;
+       int val;
+       u32 bus;
 
        val = of_get_dcic_val(np, dcic);
        if (val < 0) {