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]
Date:   Wed, 7 Jun 2023 10:51:10 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Yeqi Fu <asuk4.q@...il.com>
Cc:     dinguyen@...nel.org, tony.luck@...el.com,
        linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] EDAC/altera: Fix error checking

On Thu, May 18, 2023 at 03:15:56AM +0800, Yeqi Fu wrote:
> The function edac_debugfs_create_dir returns ERR_PTR if an error
> occurs, and the appropriate way to verify for errors is to use the
> inline function IS_ERR. The patch will substitute the null-comparison
> with IS_ERR.
> 
> Signed-off-by: Yeqi Fu <asuk4.q@...il.com>
> ---
>  drivers/edac/altera_edac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
> index 8b31cd54bdb6..19693333408f 100644
> --- a/drivers/edac/altera_edac.c
> +++ b/drivers/edac/altera_edac.c
> @@ -683,7 +683,7 @@ static void altr_create_edacdev_dbgfs(struct edac_device_ctl_info *edac_dci,
>  		return;
>  
>  	drvdata->debugfs_dir = edac_debugfs_create_dir(drvdata->edac_dev_name);
> -	if (!drvdata->debugfs_dir)
> +	if (IS_ERR(drvdata->debugfs_dir))
>  		return;
>  
>  	if (!edac_debugfs_create_file("altr_trigger", S_IWUSR,
> -- 

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ