projects
/
comedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4869288
)
__this_module fix
author
David Schleef
<ds@schleef.org>
Thu, 13 Jul 2000 01:12:43 +0000
(
01:12
+0000)
committer
David Schleef
<ds@schleef.org>
Thu, 13 Jul 2000 01:12:43 +0000
(
01:12
+0000)
comedi/drivers.c
patch
|
blob
|
history
diff --git
a/comedi/drivers.c
b/comedi/drivers.c
index 94ea1e255d7af75f2a6dd7401e3546a6d6983877..e4618ef2b4df6a6e81d5280378a2d8cbc98cf085 100644
(file)
--- a/
comedi/drivers.c
+++ b/
comedi/drivers.c
@@
-60,7
+60,8
@@
int comedi_device_detach(comedi_device *dev)
return 0;
/* this is not correct for the kmod case */
- __MOD_DEC_USE_COUNT(dev->driver->module);
+ if(dev->driver->module)
+ __MOD_DEC_USE_COUNT(dev->driver->module);
dev->attached=0;
@@
-122,7
+123,8
@@
attached:
dev->attached=1;
dev->driver=driv;
- __MOD_INC_USE_COUNT(driv->module);
+ if(dev->driver->module)
+ __MOD_INC_USE_COUNT(driv->module);
return 0;
}