summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-18 20:52:23 +0200
committerToomas Soome <tsoome@me.com>2019-04-05 09:06:50 +0300
commit280798bab7492ab1628d72247ebe1872218d98b3 (patch)
tree82b7f1fe1b10357f74f44eeecaae64cf0791ca9a
parent9173eaeb84f6d29cb141ae3814a0a2f07b550763 (diff)
downloadillumos-joyent-280798bab7492ab1628d72247ebe1872218d98b3.tar.gz
10648 sysevent: NULL pointer errors
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Reviewed by: Andy Fiddaman <andy@omniosce.org> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/io/sysevent.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/usr/src/uts/common/io/sysevent.c b/usr/src/uts/common/io/sysevent.c
index 69065b9506..2f06b48292 100644
--- a/usr/src/uts/common/io/sysevent.c
+++ b/usr/src/uts/common/io/sysevent.c
@@ -703,7 +703,7 @@ sysevent_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
}
if (ddi_create_minor_node(devi, "sysevent", S_IFCHR,
- 0, DDI_PSEUDO, NULL) == DDI_FAILURE) {
+ 0, DDI_PSEUDO, 0) == DDI_FAILURE) {
ddi_remove_minor_node(devi, NULL);
return (DDI_FAILURE);
}
@@ -727,23 +727,24 @@ sysevent_detach(dev_info_t *devi, ddi_detach_cmd_t cmd)
}
static struct cb_ops sysevent_cb_ops = {
- sysevent_open, /* open */
- sysevent_close, /* close */
- nodev, /* strategy */
- nodev, /* print */
- nodev, /* dump */
- nodev, /* read */
- nodev, /* write */
- sysevent_ioctl, /* ioctl */
- nodev, /* devmap */
- nodev, /* mmap */
- nodev, /* segmap */
- nochpoll, /* poll */
- ddi_prop_op, /* prop_op */
- 0, /* streamtab */
- D_NEW|D_MP, /* flag */
- NULL, /* aread */
- NULL /* awrite */
+ .cb_open = sysevent_open,
+ .cb_close = sysevent_close,
+ .cb_strategy = nodev,
+ .cb_print = nodev,
+ .cb_dump = nodev,
+ .cb_read = nodev,
+ .cb_write = nodev,
+ .cb_ioctl = sysevent_ioctl,
+ .cb_devmap = nodev,
+ .cb_mmap = nodev,
+ .cb_segmap = nodev,
+ .cb_chpoll = nochpoll,
+ .cb_prop_op = ddi_prop_op,
+ .cb_str = NULL,
+ .cb_flag = D_NEW | D_MP,
+ .cb_rev = CB_REV,
+ .cb_aread = NULL,
+ .cb_awrite = NULL
};
static struct dev_ops sysevent_ops = {
@@ -756,7 +757,7 @@ static struct dev_ops sysevent_ops = {
sysevent_detach, /* detach */
nodev, /* reset */
&sysevent_cb_ops, /* driver operations */
- (struct bus_ops *)0, /* no bus operations */
+ NULL, /* no bus operations */
nulldev, /* power */
ddi_quiesce_not_needed, /* quiesce */
};