From: Sakari Ailus Date: Mon, 18 Feb 2019 16:33:54 +0000 (-0500) Subject: media: staging: imgu: Remove redundant checks X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0ace8734f40564ae9405df9f12f0fde6cd7fa7e8;p=openwrt%2Fstaging%2Fblogic.git media: staging: imgu: Remove redundant checks Remove redundant checks for less than zero on unsigned variables. Signed-off-by: Sakari Ailus Tested-by: Rajmohan Mani Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/ipu3/ipu3-css-fw.c b/drivers/staging/media/ipu3/ipu3-css-fw.c index 4122d4e42db6..45aff76198e2 100644 --- a/drivers/staging/media/ipu3/ipu3-css-fw.c +++ b/drivers/staging/media/ipu3/ipu3-css-fw.c @@ -200,13 +200,11 @@ int imgu_css_fw_init(struct imgu_css *css) goto bad_fw; for (j = 0; j < bi->info.isp.num_output_formats; j++) - if (bi->info.isp.output_formats[j] < 0 || - bi->info.isp.output_formats[j] >= + if (bi->info.isp.output_formats[j] >= IMGU_ABI_FRAME_FORMAT_NUM) goto bad_fw; for (j = 0; j < bi->info.isp.num_vf_formats; j++) - if (bi->info.isp.vf_formats[j] < 0 || - bi->info.isp.vf_formats[j] >= + if (bi->info.isp.vf_formats[j] >= IMGU_ABI_FRAME_FORMAT_NUM) goto bad_fw;