From: Anant Thazhemadam Date: Wed, 26 Aug 2020 11:09:15 +0000 (+0200) Subject: media: atomisp: fix "dubious: !x | !y" sparse warning X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~1054^2~333 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=a4f3761771bc45ab433bd38fd437bb2e40617f27;p=linux.git media: atomisp: fix "dubious: !x | !y" sparse warning Upon running Sparse, "warning: dubious: !x | !y" is brought to notice for this file. Logical and bitwise OR are basically the same in this context, so it doesn't cause a runtime bug. But let's change it to logical OR to make it a little bit cleaner and silence the Sparse warning. Signed-off-by: Anant Thazhemadam Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c index 358cb7d2cd4c..3b850bb2d39d 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c +++ b/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c @@ -58,7 +58,7 @@ sh_css_vf_downscale_log2( unsigned int ds_log2 = 0; unsigned int out_width; - if ((!out_info) | (!vf_info)) + if ((!out_info) || (!vf_info)) return -EINVAL; out_width = out_info->res.width;