* [PATCH] media: atomisp: remove redundant NULL check of "params"
@ 2020-11-17 8:10 Ding Xiang
0 siblings, 0 replies; only message in thread
From: Ding Xiang @ 2020-11-17 8:10 UTC (permalink / raw)
To: mchehab, sakari.ailus; +Cc: devel, linux-kernel, linux-media
The check result of (!A || (A && B)) is equivalent to (!A || B),
so remove redundant NULL check of "params"
Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.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 24fc497bd491..9eb02f463eba 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 @@ ia_css_dvs2_6axis_config_allocate(const struct ia_css_stream *stream)
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);
--
2.28.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-17 8:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 8:10 [PATCH] media: atomisp: remove redundant NULL check of "params" Ding Xiang
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).