From: Mauro Carvalho Chehab Date: Thu, 21 Aug 2014 20:56:16 +0000 (-0500) Subject: [media] gsc-core: Remove useless test X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cff562137226d0f431e85733795edd271e946087;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] gsc-core: Remove useless test 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 --- diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 9d0cc04d7ab7..8d8b3cff8212 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -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; }