[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20110609120030.GA15307@mail.fossee.in>
Date: Thu, 9 Jun 2011 17:30:30 +0530
From: "Prashant P. Shah" <pshah.mumbai@...il.com>
To: devel@...uxdriverproject.org
Cc: Greg Kroah-Hartman <gregkh@...e.de>,
Frank Mori Hess <fmhess@...rs.sourceforge.net>,
Ian Abbott <abbotti@....co.uk>, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] Staging: comedi: dyna_pci10xx: check for NULL value
Check NULL value for devpriv during detach callback
Signed-off-by: Prashant P. Shah <pshah.mumbai@...il.com>
---
drivers/staging/comedi/drivers/dyna_pci10xx.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/drivers/staging/comedi/drivers/dyna_pci10xx.c
index 50abb6e..d8821b9 100644
--- a/drivers/staging/comedi/drivers/dyna_pci10xx.c
+++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c
@@ -410,14 +410,12 @@ found:
static int dyna_pci10xx_detach(struct comedi_device *dev)
{
- if (devpriv->pci_dev)
+ if (devpriv && devpriv->pci_dev)
comedi_pci_disable(devpriv->pci_dev);
return 0;
}
-/* COMEDI_PCI_INITCLEANUP(dyna_pci10xx_driver, dyna_pci10xx_pci_table); */
-
static int __devinit driver_dyna_pci10xx_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists