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@xxxxxxxxxxxxxxxxx> Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx> --- 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