lkml.org 
[lkml]   [2015]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 3/4] staging: unisys: remove comparison
Date
MAJOR(majordev) is 0 when dynamic major number is used, and it is
greater than 0 when static major number is used. Considering both the
cases the expression is always true.

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

v2: changed commit log

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 e9459af..e88a215 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


\
 
 \ /
  Last update: 2015-03-12 18:41    [W:0.202 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site