mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/2] Staging: comedi: dyna_pci10xx: check for NULL value
@ 2011-06-09 12:00 Prashant P. Shah
  0 siblings, 0 replies; only message in thread
From: Prashant P. Shah @ 2011-06-09 12:00 UTC (permalink / raw)
  To: devel; +Cc: Greg Kroah-Hartman, Frank Mori Hess, Ian Abbott, linux-kernel

Check NULL value for devpriv during detach callback

Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-09 11:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09 12:00 [PATCH 2/2] Staging: comedi: dyna_pci10xx: check for NULL value Prashant P. Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®