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.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Yang Li 2021-01-21 09:28:51 +01:00 committed by Mauro Carvalho Chehab
parent 760dba07bc
commit 58fba0b16c
1 changed files with 2 additions and 4 deletions

View File

@ -1575,8 +1575,7 @@ ia_css_isp_3a_statistics_map_allocate(
return me;
err:
if (me)
kvfree(me);
kvfree(me);
return NULL;
}
@ -3006,8 +3005,7 @@ ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream)
}
kvfree(params);
if (per_frame_params)
kvfree(per_frame_params);
kvfree(per_frame_params);
stream->isp_params_configs = NULL;
stream->per_frame_isp_params_configs = NULL;