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: <1427210250-30427-5-git-send-email-sudipm.mukherjee@gmail.com>
Date:	Tue, 24 Mar 2015 20:47:30 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Benjamin Romer <benjamin.romer@...sys.com>,
	David Kershner <david.kershner@...sys.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	sparmaintainer@...sys.com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH v5 5/5] staging: unisys: remove comparison

the comparison is always true as the dev_t has been initialized in the
init function and we are sending that initialized dev_t to the
cleanup().

Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
---

v5: reordered the patch series
v4: messed up the subject in v3
v3: broke the previous patch in series

 drivers/staging/unisys/visorchipset/file.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index 890869a..39b19af 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -76,9 +76,7 @@ visorchipset_file_cleanup(dev_t major_dev)
 	if (file_cdev.ops != NULL)
 		cdev_del(&file_cdev);
 	file_cdev.ops = NULL;
-	if (MAJOR(major_dev) >= 0) {
-		unregister_chrdev_region(major_dev, 1);
-	}
+	unregister_chrdev_region(major_dev, 1);
 }
 
 static int
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ