Commit c63ef142 authored by Xu Wang's avatar Xu Wang Committed by Mauro Carvalho Chehab
Browse files

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.

Link: https://lore.kernel.org/linux-media/20201225083818.64588-1-vulab@iscas.ac.cn


Signed-off-by: default avatarXu Wang <vulab@iscas.ac.cn>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent c606970d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -155,7 +155,6 @@ 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);
			if (css_params->params[pclass][mem].address)
				hmm_free(css_params->params[pclass][mem].address);