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: <46992d97-e803-4d7e-b951-1a2a9d1b6987@intel.com>
Date: Mon, 8 Sep 2025 10:47:59 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Lin Yujun <linyujun809@...artners.com>, dan.j.williams@...el.com,
 vishal.l.verma@...el.com, ira.weiny@...el.com, santosh@...six.org
Cc: nvdimm@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] ndtest: Fix incorrect handling for return value of
 device_create_with_groups.



On 9/8/25 5:23 AM, Lin Yujun wrote:
> The return value of device_create_with_groups will not
> be an null pointer, use IS_ERR() to fix incorrect handling
> return value of device_create_with_groups.
> 
> Fixes: 9399ab61ad82 ("ndtest: Add dimms to the two buses")
> Signed-off-by: Lin Yujun <linyujun809@...artners.com>

Reviewed-by: Dave Jiang <dave.jiang@...el.com>
> ---
>  tools/testing/nvdimm/test/ndtest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/nvdimm/test/ndtest.c b/tools/testing/nvdimm/test/ndtest.c
> index 68a064ce598c..7d722f2f7d62 100644
> --- a/tools/testing/nvdimm/test/ndtest.c
> +++ b/tools/testing/nvdimm/test/ndtest.c
> @@ -745,11 +745,11 @@ static int ndtest_dimm_register(struct ndtest_priv *priv,
>  
>  	dimm->dev = device_create_with_groups(&ndtest_dimm_class,
>  					     &priv->pdev.dev,
>  					     0, dimm, dimm_attribute_groups,
>  					     "test_dimm%d", id);
> -	if (!dimm->dev) {
> +	if (IS_ERR(dimm->dev)) {
>  		pr_err("Could not create dimm device attributes\n");
>  		return -ENOMEM;
>  	}
>  
>  	return 0;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ