[PATCH 2/2] staging: unisys: remove comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



the macro comparison is always true as MAJOR is defined as
unsiged int.

Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>
---
 drivers/staging/unisys/visorchipset/file.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index 9ca7f1e..a1e8e79 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -82,10 +82,8 @@ visorchipset_file_cleanup(void)
 		cdev_del(&file_cdev);
 	file_cdev.ops = NULL;
 	if (registered) {
-		if (MAJOR(majordev) >= 0) {
-			unregister_chrdev_region(majordev, 1);
-			majordev = MKDEV(0, 0);
-		}
+		unregister_chrdev_region(majordev, 1);
+		majordev = MKDEV(0, 0);
 		registered = FALSE;
 	}
 }
-- 
1.8.1.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux