Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752247AbaGKEDG (ORCPT ); Fri, 11 Jul 2014 00:03:06 -0400 Received: from mail-ie0-f179.google.com ([209.85.223.179]:54369 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751943AbaGKEDF (ORCPT ); Fri, 11 Jul 2014 00:03:05 -0400 From: Chase Southwood To: gregkh@linuxfoundation.org Cc: abbotti@mev.co.uk, hsweeten@visionengravers.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Chase Southwood Subject: [PATCH 3/4] staging: comedi: addi_apci_1564: remove null check of devpriv in apci1564_detach() Date: Thu, 10 Jul 2014 23:02:27 -0500 Message-Id: X-Mailer: git-send-email 2.0.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to test whether devpriv is null in this function. The check looks left over and we can just remove it. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi_apci_1564.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index e3dcab7..f91aedd 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -433,14 +433,10 @@ static int apci1564_auto_attach(struct comedi_device *dev, static void apci1564_detach(struct comedi_device *dev) { - struct apci1564_private *devpriv = dev->private; - - if (devpriv) { - if (dev->iobase) - apci1564_reset(dev); - if (dev->irq) - free_irq(dev->irq, dev); - } + if (dev->iobase) + apci1564_reset(dev); + if (dev->irq) + free_irq(dev->irq, dev); comedi_pci_disable(dev); } -- 2.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/