* [PATCH] media: staging: media: Remove redundant NULL check
@ 2021-03-23 2:02 Jiapeng Chong
0 siblings, 0 replies; only message in thread
From: Jiapeng Chong @ 2021-03-23 2:02 UTC (permalink / raw)
To: mchehab
Cc: sakari.ailus, gregkh, linux-media, linux-staging, linux-kernel,
Jiapeng Chong
Fix the following coccicheck warnings:
./drivers/staging/media/atomisp/pci/atomisp_cmd.c:4269:2-8: WARNING:
NULL check before some freeing functions is not needed.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 592ea99..d818eaa 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -4626,8 +4626,7 @@ int atomisp_fixed_pattern(struct atomisp_sub_device *asd, int flag,
err:
if (ret && res)
ia_css_frame_free(res);
- if (tmp_buf)
- vfree(tmp_buf);
+ vfree(tmp_buf);
if (ret == 0)
*result = res;
return ret;
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-23 2:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 2:02 [PATCH] media: staging: media: Remove redundant NULL check Jiapeng Chong
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).