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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181110224451.GA23585@lkp-ne04>
Date:   Sun, 11 Nov 2018 06:44:51 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Alex Williamson <alex.williamson@...hat.com>
Cc:     kbuild-all@...org, alex.williamson@...hat.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, christian.ehrhardt@...onical.com
Subject: [PATCH] vfio/pci: fix ptr_ret.cocci warnings

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

drivers/vfio/pci/vfio_pci.c:1396:8-14: 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: 25e57457f6f2 ("vfio/pci: Parallelize device open and release")
CC: Alex Williamson <alex.williamson@...hat.com>
Signed-off-by: kbuild test robot <fengguang.wu@...el.com>
---

url:    https://github.com/0day-ci/linux/commits/Alex-Williamson/vfio-pci-Parallelize-device-open-and-release/20181111-025016
base:   https://github.com/awilliam/linux-vfio.git next

 vfio_pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -1393,7 +1393,7 @@ static int vfio_pci_reflck_attach(struct
 
 	mutex_unlock(&reflck_lock);
 
-	return IS_ERR(vdev->reflck) ? PTR_ERR(vdev->reflck) : 0;
+	return PTR_ERR_OR_ZERO(vdev->reflck);
 }
 
 static void vfio_pci_reflck_release(struct kref *kref)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ