[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1611220312-89384-3-git-send-email-abaci-bugfix@linux.alibaba.com>
Date: Thu, 21 Jan 2021 17:11:52 +0800
From: Yang Li <abaci-bugfix@...ux.alibaba.com>
To: mchehab@...nel.org
Cc: sakari.ailus@...ux.intel.com, gregkh@...uxfoundation.org,
linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org,
Yang Li <abaci-bugfix@...ux.alibaba.com>
Subject: [PATCH 3/3] media: atomisp: remove redundant NULL check
Fix below warnings reported by coccicheck:
./drivers/staging/media/atomisp/pci/atomisp_cmd.c:4269:2-8: WARNING:
NULL check before some freeing functions is not needed.
./drivers/staging/media/atomisp/pci/atomisp_cmd.c:4626:2-8: WARNING:
NULL check before some freeing functions is not needed.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <abaci-bugfix@...ux.alibaba.com>
---
drivers/staging/media/atomisp/pci/atomisp_cmd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 592ea99..72a6cac 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -4265,8 +4265,7 @@ int atomisp_set_parameters(struct video_device *vdev,
apply_parameter_failed:
if (css_param)
atomisp_free_css_parameters(css_param);
- if (param)
- kvfree(param);
+ kvfree(param);
return ret;
}
@@ -4626,8 +4625,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
Powered by blists - more mailing lists