[media] gsc-core: Remove useless test
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 21 Aug 2014 20:56:16 +0000 (15:56 -0500)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 26 Aug 2014 21:51:59 +0000 (18:51 -0300)
drivers/media/platform/exynos-gsc/gsc-core.c: In function 'gsc_probe':
drivers/media/platform/exynos-gsc/gsc-core.c:1089:2: warning: comparison is alw
ays false due to limited range of data type [-Wtype-limits]
  if (gsc->id < 0 || gsc->id >= drv_data->num_entities) {
  ^

gsc->id is declared as u16, so it should always be a positive
value.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/exynos-gsc/gsc-core.c

index 9d0cc04d7ab7ee1ffc2e41db4bb14436f9c15e80..8d8b3cff8212bf9d6bba7edb119bf61f84e78236 100644 (file)
@@ -1086,7 +1086,7 @@ static int gsc_probe(struct platform_device *pdev)
        else
                gsc->id = pdev->id;
 
-       if (gsc->id < 0 || gsc->id >= drv_data->num_entities) {
+       if (gsc->id >= drv_data->num_entities) {
                dev_err(dev, "Invalid platform device id: %d\n", gsc->id);
                return -EINVAL;
        }