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: <20160729083150.GA8819@amitoj-Inspiron-3542>
Date:	Fri, 29 Jul 2016 14:01:50 +0530
From:	Amitoj Kaur Chawla <amitoj1606@...il.com>
To:	sebott@...ux.vnet.ibm.com, gerald.schaefer@...ibm.com,
	schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
	linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	julia.lawall@...6.fr
Subject: [PATCH] s390/pci: Remove unnecessary if condition

Remove unnecessary error handling because the only failure value that
can be returned is NULL and so the test can never be true.

The Coccinelle semantic patch used to make this change is as follows:
@@
expression e;
@@

  e = debugfs_create_file(...);
- if(IS_ERR(e)) { e = NULL; }

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@...il.com>
---
 arch/s390/pci/pci_debug.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/s390/pci/pci_debug.c b/arch/s390/pci/pci_debug.c
index 4129b0a..8a25b04 100644
--- a/arch/s390/pci/pci_debug.c
+++ b/arch/s390/pci/pci_debug.c
@@ -139,8 +139,6 @@ void zpci_debug_init_device(struct zpci_dev *zdev)
 				S_IFREG | S_IRUGO | S_IWUSR,
 				zdev->debugfs_dev, zdev,
 				&debugfs_pci_perf_fops);
-	if (IS_ERR(zdev->debugfs_perf))
-		zdev->debugfs_perf = NULL;
 }
 
 void zpci_debug_exit_device(struct zpci_dev *zdev)
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ