lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9087d9398abf469f9f1ff30fcb608719@huawei.com>
Date:   Wed, 2 Jun 2021 01:32:38 +0000
From:   zhengyongjun <zhengyongjun3@...wei.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
CC:     "mchehab@...nel.org" <mchehab@...nel.org>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        "linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "sakari.ailus@...ux.intel.com" <sakari.ailus@...ux.intel.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: 答复: [PATCH -next] media: atomisp: Remove unneeded if-null-free check

Thanks for your advice, I send patch v2 now :)

-----邮件原件-----
发件人: Dan Carpenter [mailto:dan.carpenter@...cle.com] 
发送时间: 2021年6月1日 22:47
收件人: zhengyongjun <zhengyongjun3@...wei.com>
抄送: mchehab@...nel.org; linux-media@...r.kernel.org; linux-staging@...ts.linux.dev; linux-kernel@...r.kernel.org; sakari.ailus@...ux.intel.com; gregkh@...uxfoundation.org
主题: Re: [PATCH -next] media: atomisp: Remove unneeded if-null-free check

On Tue, Jun 01, 2021 at 10:20:05PM +0800, Zheng Yongjun wrote:
> Eliminate the following coccicheck warning:
> 
> drivers/staging/media/atomisp/pci/sh_css_firmware.c:369:4-10: WARNING:
> NULL check before some freeing functions is not needed.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
> ---
>  drivers/staging/media/atomisp/pci/sh_css_firmware.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/sh_css_firmware.c b/drivers/staging/media/atomisp/pci/sh_css_firmware.c
> index f4ce8ace9d50..980fc09fcc8b 100644
> --- a/drivers/staging/media/atomisp/pci/sh_css_firmware.c
> +++ b/drivers/staging/media/atomisp/pci/sh_css_firmware.c
> @@ -365,8 +365,7 @@ void sh_css_unload_firmware(void)
>  		for (i = 0; i < sh_css_num_binaries; i++) {
>  			if (fw_minibuffer[i].name)
>  				kfree((void *)fw_minibuffer[i].name);

Change this too.

> -			if (fw_minibuffer[i].buffer)
> -				kvfree(fw_minibuffer[i].buffer);
> +			kvfree(fw_minibuffer[i].buffer);
>  		}
>  		kfree(fw_minibuffer);
>  		fw_minibuffer = NULL;

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ