Commit 58fba0b1 authored by Yang Li's avatar Yang Li Committed by Mauro Carvalho Chehab

media: atomisp: remove redundant NULL check

Fix below warnings reported by coccicheck:
./drivers/staging/media/atomisp/pci/sh_css_params.c:1575:2-8: WARNING:
NULL check before some freeing functions is not needed.
./drivers/staging/media/atomisp/pci/sh_css_params.c:3006:2-8: WARNING:
NULL check before some freeing functions is not needed.

Link: https://lore.kernel.org/linux-media/1611217731-56866-1-git-send-email-abaci-bugfix@linux.alibaba.comReported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarYang Li <abaci-bugfix@linux.alibaba.com>
Reviewed-by: default avatarRobert Foss <robert.foss@linaro.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 760dba07
...@@ -1575,8 +1575,7 @@ ia_css_isp_3a_statistics_map_allocate( ...@@ -1575,8 +1575,7 @@ ia_css_isp_3a_statistics_map_allocate(
return me; return me;
err: err:
if (me) kvfree(me);
kvfree(me);
return NULL; return NULL;
} }
...@@ -3006,8 +3005,7 @@ ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream) ...@@ -3006,8 +3005,7 @@ ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream)
} }
kvfree(params); kvfree(params);
if (per_frame_params) kvfree(per_frame_params);
kvfree(per_frame_params);
stream->isp_params_configs = NULL; stream->isp_params_configs = NULL;
stream->per_frame_isp_params_configs = NULL; stream->per_frame_isp_params_configs = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment