[PATCH] [media] exynos-gsc: remove an always false condition
Sylwester Nawrocki
s.nawrocki at samsung.com
Thu Apr 14 02:05:17 PDT 2016
On 04/13/2016 09:32 PM, Mauro Carvalho Chehab wrote:
> As reported by smatch:
> drivers/media/platform/exynos-gsc/gsc-core.c:1073 gsc_probe() warn: impossible condition '(gsc->id < 0) => (0-65535 < 0)'
> drivers/media/platform/exynos-gsc/gsc-core.c: In function 'gsc_probe':
> drivers/media/platform/exynos-gsc/gsc-core.c:1073:51: warning: comparison is always false due to limited range of data type [-Wtype-limits]
> if (gsc->id >= drv_data->num_entities || gsc->id < 0) {
> ^
>
> gsc->id is an u16, so it can never be a negative number. So,
> remove the always false condition.
>
> Fixes: c1ac057173ba "[media] exynos-gsc: remove non-device-tree init code"
> Cc: Sylwester Nawrocki <s.nawrocki at samsung.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab at osg.samsung.com>
Thanks for fixing this.
Acked-by: Sylwester Nawrocki <s.nawrocki at samsung.com>
--
Regards,
Sylwester
More information about the linux-arm-kernel
mailing list