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>] [day] [month] [year] [list]
Message-Id: <20161031065037.2873-1-christophe.jaillet@wanadoo.fr>
Date:   Mon, 31 Oct 2016 07:50:37 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     dan.j.williams@...el.com, vishal.l.verma@...el.com, jlee@...e.com,
        rafael@...nel.org, linda.knippers@....com
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH] tools/testing/nvdimm: Fix error handling

'device_create_with_groups()' returns an error pointer in case of error,
not NULL. So test it with IS_ERR.

Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
 tools/testing/nvdimm/test/nfit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
index c9a6458cb63e..a99a1b64dd84 100644
--- a/tools/testing/nvdimm/test/nfit.c
+++ b/tools/testing/nvdimm/test/nfit.c
@@ -715,7 +715,7 @@ static int nfit_test0_alloc(struct nfit_test *t)
 				&t->pdev.dev, 0, NULL,
 				nfit_test_dimm_attribute_groups,
 				"test_dimm%d", i);
-		if (!t->dimm_dev[i])
+		if (IS_ERR(t->dimm_dev[i]))
 			return -ENOMEM;
 	}
 
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ