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. Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx> Signed-off-by: Yang Li <abaci-bugfix@xxxxxxxxxxxxxxxxx> --- drivers/staging/media/atomisp/pci/sh_css_params.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c index 24fc497..569473b9 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_params.c +++ b/drivers/staging/media/atomisp/pci/sh_css_params.c @@ -1575,8 +1575,7 @@ struct ia_css_isp_3a_statistics_map * return me; err: - if (me) - kvfree(me); + kvfree(me); return NULL; } @@ -3006,8 +3005,7 @@ static void free_map(struct sh_css_ddr_address_map *map) } 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; -- 1.8.3.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel