From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752925AbbCXPSF (ORCPT ); Tue, 24 Mar 2015 11:18:05 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33619 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752901AbbCXPSA (ORCPT ); Tue, 24 Mar 2015 11:18:00 -0400 From: Sudip Mukherjee To: Benjamin Romer , David Kershner , Greg Kroah-Hartman Cc: sparmaintainer@unisys.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Dan Carpenter , Sudip Mukherjee Subject: [PATCH v5 5/5] staging: unisys: remove comparison Date: Tue, 24 Mar 2015 20:47:30 +0530 Message-Id: <1427210250-30427-5-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1427210250-30427-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1427210250-30427-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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