public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] media: atomisp: remove redundant NULL check
@ 2021-01-21  9:11 Yang Li
  2021-01-21  9:11 ` [PATCH 2/3] " Yang Li
  2021-01-21  9:11 ` [PATCH 3/3] " Yang Li
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Li @ 2021-01-21  9:11 UTC (permalink / raw)
  To: mchehab; +Cc: sakari.ailus, gregkh, linux-media, devel, linux-kernel, Yang Li

Fix below 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.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
---
 drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c b/drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c
index e861777..823ec54 100644
--- a/drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c
+++ b/drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c
@@ -155,8 +155,7 @@
 
 	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;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-21  9:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-21  9:11 [PATCH 1/3] media: atomisp: remove redundant NULL check Yang Li
2021-01-21  9:11 ` [PATCH 2/3] " Yang Li
2021-01-21  9:11 ` [PATCH 3/3] " Yang Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox