Skip to contentSkip to conversation

media: atomisp: Simplify the calculation of variables

PATCH New Jiapeng Zhong 1 participant 1 message Jan 26, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: atomisp: Simplify the calculation of variables

Fix the following coccicheck warnings:

./drivers/staging/media/atomisp/pci/sh_css_params.c:4652:24-26: WARNING !A || A && B is equivalent to !A || B.

---
 drivers/staging/media/atomisp/pci/sh_css_params.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/media/atomisp/pci/sh_css_params.c +1 -3
index 24fc497..9eb02f4 100644
@@ -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);
Signature · 1 line
1.8.3.1