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-next>] [day] [month] [year] [list]
Message-ID: <20181127232130.GA28456@sof-kbuild01>
Date:   Wed, 28 Nov 2018 07:21:30 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Jason Gunthorpe <jgg@...lanox.com>
Cc:     kbuild-all@...org, Leon Romanovsky <leonro@...lanox.com>,
        Doug Ledford <dledford@...hat.com>,
        Yishai Hadas <yishaih@...lanox.com>,
        Mark Bloch <markb@...lanox.com>,
        Matan Barak <matanb@...lanox.com>,
        Ariel Levkovich <lariel@...lanox.com>,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] RDMA/uverbs: fix ptr_ret.cocci warnings

From: kbuild test robot <fengguang.wu@...el.com>

drivers/infiniband/core/uverbs_cmd.c:1095:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 7106a9769715 ("RDMA/uverbs: Make write() handlers return 0 on success")
Signed-off-by: kbuild test robot <fengguang.wu@...el.com>
---

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma for-next
head:   07f05f40d956d40f32852a7b3ff109a72d254cf9
commit: 7106a9769715bb4c0448927a29aa3b505855871c [31/37] RDMA/uverbs: Make write() handlers return 0 on success

 uverbs_cmd.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -1092,10 +1092,7 @@ static int ib_uverbs_create_cq(struct uv
 			sizeof(cmd.comp_channel), ib_uverbs_create_cq_cb,
 			NULL);
 
-	if (IS_ERR(obj))
-		return PTR_ERR(obj);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(obj);
 }
 
 static int ib_uverbs_ex_create_cq_cb(struct uverbs_attr_bundle *attrs,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ