staging: unisys: remove comparison
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 24 Mar 2015 15:17:30 +0000 (20:47 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 23:01:24 +0000 (00:01 +0100)
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@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorchipset/file.c

index 890869ad36f4c235d64cddd0303e2c28e7315abe..39b19afa51692e36a99557a3657b9578a3a016ad 100644 (file)
@@ -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