* [PATCH] drivers:staging: Simplify the if condition
@ 2021-03-24 5:45 caizhichao
2021-03-24 8:20 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: caizhichao @ 2021-03-24 5:45 UTC (permalink / raw)
To: mchehab
Cc: linux-staging, linux-kernel, linux-media, gregkh, sakari.ailus,
Zhichao Cai
From: Zhichao Cai <caizhichao@yulong.com>
Fixes coccicheck warning:
drivers/staging/media/atomisp/pci/sh_css_params.c:4652:24-26: WARNING !A || A && B is equivalent to !A || B
Signed-off-by: Zhichao Cai <caizhichao@yulong.com>
---
drivers/staging/media/atomisp/pci/sh_css_params.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c
index 9fad28b..7467256 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_params.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_params.c
@@ -4649,10 +4649,8 @@ struct ia_css_dvs_6axis_config *
params = stream->isp_params_configs;
/* Backward compatibility by default consider pipe as Video*/
- if (!params || (params &&
- !params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO])) {
+ if (!params || !params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO])
goto err;
- }
dvs_config = kvcalloc(1, sizeof(struct ia_css_dvs_6axis_config),
GFP_KERNEL);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers:staging: Simplify the if condition
2021-03-24 5:45 [PATCH] drivers:staging: Simplify the if condition caizhichao
@ 2021-03-24 8:20 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-03-24 8:20 UTC (permalink / raw)
To: caizhichao
Cc: mchehab, linux-staging, linux-kernel, linux-media, gregkh,
sakari.ailus, Zhichao Cai
On Wed, Mar 24, 2021 at 01:45:35PM +0800, caizhichao wrote:
> From: Zhichao Cai <caizhichao@yulong.com>
>
> Fixes coccicheck warning:
> drivers/staging/media/atomisp/pci/sh_css_params.c:4652:24-26: WARNING !A || A && B is equivalent to !A || B
>
Thanks, but someone already did this. Please work against linux-next.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-24 8:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 5:45 [PATCH] drivers:staging: Simplify the if condition caizhichao
2021-03-24 8:20 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).