polachok's projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04cb408
)
Don't care about events if nobody listens.
author
Alexander Polakov
<polachok@gmail.com>
Thu, 26 Nov 2009 23:00:37 +0000
(
02:00
+0300)
committer
Alexander Polakov
<polachok@gmail.com>
Wed, 2 Dec 2009 21:47:35 +0000
(
00:47
+0300)
Is that a good idea?
sys/dev/misc/hotplug/hotplug.c
patch
|
blob
|
blame
|
history
diff --git
a/sys/dev/misc/hotplug/hotplug.c
b/sys/dev/misc/hotplug/hotplug.c
index
b52a641
..
1c789e1
100644
(file)
--- a/
sys/dev/misc/hotplug/hotplug.c
+++ b/
sys/dev/misc/hotplug/hotplug.c
@@
-170,7
+170,7
@@
hotplug_devfs_node_added(cdev_t dev) {
u_int class;
char *name;
- if(
dev == NULL
)
+ if(
!dev || !hpsc.opened
)
return;
class = dev->si_ops->head.flags;
name = dev->si_name;
@@
-186,7
+186,7
@@
hotplug_devfs_node_removed(cdev_t dev) {
u_int class;
char *name;
- if(
dev == NULL
)
+ if(
!dev || !hpsc.opened
)
return;
class = dev->si_ops->head.flags;
name = dev->si_name;