Skip to contentSkip to conversation

media: atomisp: Remove redundant NULL check

PATCH New Xu Wang 1 participant 1 message Dec 25, 2020

Subsystems (4)
lore
Share & tools
lore

Xu Wang

author
#0 lore raw

PATCH 1/1 media: atomisp: Remove redundant NULL check

Fix warnings reported by coccicheck:
./drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c:159:4-10: WARNING: NULL check before some freeing functions is not needed.

---
 .../media/atomisp/pci/runtime/isp_param/src/isp_param.c        | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c +1 -2
index e861777385a0..823ec54b6281 100644
@@ -155,8 +155,7 @@ ia_css_isp_param_destroy_isp_parameters(
 
 	for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) {
 		for (pclass = 0; pclass < IA_CSS_NUM_PARAM_CLASSES; pclass++) {
-			if (mem_params->params[pclass][mem].address)
-				kvfree(mem_params->params[pclass][mem].address);
+			kvfree(mem_params->params[pclass][mem].address);
 			if (css_params->params[pclass][mem].address)
 				hmm_free(css_params->params[pclass][mem].address);
 			mem_params->params[pclass][mem].address = NULL;
Signature · 1 line
2.17.1