[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAG3jFytsopFdw=McsXYgh4Bg6xtGgMqY33++3VxuV98xMSNEMA@mail.gmail.com>
Date: Fri, 22 Jan 2021 09:53:17 +0100
From: Robert Foss <robert.foss@...aro.org>
To: Yang Li <abaci-bugfix@...ux.alibaba.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-media <linux-media@...r.kernel.org>,
devel@...verdev.osuosl.org,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: atomisp: remove redundant NULL check
Thanks for the patch.
Feel free to add my r-b:
Reviewed-by: Robert Foss <robert.foss@...aro.org>
On Thu, 21 Jan 2021 at 09:31, Yang Li <abaci-bugfix@...ux.alibaba.com> wrote:
>
> 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@...ux.alibaba.com>
> Signed-off-by: Yang Li <abaci-bugfix@...ux.alibaba.com>
> ---
> 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
>
Powered by blists - more mailing lists