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. Link: https://lore.kernel.org/linux-media/1611220312-89384-3-git-send-email-abaci-bugfix@linux.alibaba.com Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
58fba0b16c
commit
ac68fb7f12
1 changed files with 2 additions and 4 deletions
|
|
@ -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 @@ atomisp_v4l2_framebuffer_to_css_frame(const struct v4l2_framebuffer *arg,
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue