summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/io/timerfd.c
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-04-10 12:02:07 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-04-10 12:02:07 +0000
commitd8075b7816cce899d8e5b43d151dd0e44f758855 (patch)
treef71120151f80d35258c72ffb14964ec75548ecee /usr/src/uts/common/io/timerfd.c
parent859ebfe200b305925f31fe30e4fc87ab9b8ca79a (diff)
parent1aa5f89221657a92fc85060db4d7cc17b91007e1 (diff)
downloadillumos-joyent-d8075b7816cce899d8e5b43d151dd0e44f758855.tar.gz
[illumos-gate merge]
commit 1aa5f89221657a92fc85060db4d7cc17b91007e1 10674 profile: NULL pointer errors commit afac708dc1fa673063127e6091e0f29b33739e9e 10673 ixgbe: NULL pointer errors commit 87f90db88e11450dae14066aad4712c4798415c2 10671 bnxe: NULL pointer errors commit ae6f9789e23baaa0d8a3f14c37c068824b33f5e6 10670 i40e: NULL pointer errors commit f52680fe552c1a5f149342ab191a00a072db59c5 10668 e1000g: NULL pointer errors commit 40a733010c7e8c82a55807f59f6e912e51355d2a 10664 vmxnet3s: NULL pointer errors commit e59325b74ca0760391c4b4d3acd8d3294ffc521a 10663 stmf_sbd: NULL pointer errors commit 1f99504ab52e6927794513144ed20e8c0ba5ea6e 10662 iscsit: NULL pointer errors commit 64a6bd963243a20fc11b593b7bec96ea000f8bf6 10660 swrand: NULL pointer errors commit d659c726b2a72b51ac2dc9a7f6878463fc070c87 10659 sha2: NULL pointer errors commit 2667222682da9a362b1246a1e39cdaf1f38cb56e 10658 kiconv_ja: NULL pointer errors commit 986667e8344d0f6a3e45df8c7ddcc62f747e3793 10650 timerfd: NULL pointer errors commit 0f36d2f14c16f2aa8dbbd72241001f534f1ca1b2 10666 amd8111s: NULL pointer errors commit 4dae08142020c6a787edca246244aa744a986710 10667 ipmi: NULL pointer errors commit 4138d84ec424020fc615b6aa351408e1efb98a38 10646 softmac: NULL pointer errors commit 95369d7b997316a0170a6c243bfbfc61d1258fb5 10634 qlge: NULL pointer errors commit 3aedb073327854aba1e08f2cd606208552e0ea55 10632 pm: NULL pointer errors commit 490f8d7888f182c08d8e83e38cd281c8f867b0a3 10682 strftime(3c): Replace (char *)0 by NULL commit 12e9eaaed8879c4b56117e0ea40df0a2d2e16b0e 10625 physmem: NULL pointer error commit d5f5d51371113b7fe3bc52690ff232a5b6719bfd 10672 igb: NULL pointer issues commit 5edb9b5616c939f80239ac527226023f79962708 10693 mmp test profiles incorrectly include mmp_write_distribution test commit 03d81b69f83828ec5d3e0fe05c00d07699706d2e 10681 udp.c: udp_reuseaddr commit 9c3cf8b30473a1ce5e6f5e1b75844daf78ae0309 10702 loader: console.c inconsistent indenting
Diffstat (limited to 'usr/src/uts/common/io/timerfd.c')
-rw-r--r--usr/src/uts/common/io/timerfd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/uts/common/io/timerfd.c b/usr/src/uts/common/io/timerfd.c
index 29eea9b24a..333373b91a 100644
--- a/usr/src/uts/common/io/timerfd.c
+++ b/usr/src/uts/common/io/timerfd.c
@@ -122,7 +122,7 @@ timerfd_open(dev_t *devp, int flag, int otyp, cred_t *cred_p)
if (ddi_soft_state_zalloc(timerfd_softstate, minor) != DDI_SUCCESS) {
vmem_free(timerfd_minor, (void *)(uintptr_t)minor, 1);
mutex_exit(&timerfd_lock);
- return (NULL);
+ return (ENXIO);
}
state = ddi_get_soft_state(timerfd_softstate, minor);
@@ -331,7 +331,7 @@ timerfd_ioctl(dev_t dev, int cmd, intptr_t arg, int md, cred_t *cr, int *rv)
return (ENODEV);
}
- if (st.tfd_settime_ovalue != NULL) {
+ if (st.tfd_settime_ovalue != 0) {
err = it->it_backend->clk_timer_gettime(it, &oval);
if (err != 0) {
@@ -373,7 +373,7 @@ timerfd_ioctl(dev_t dev, int cmd, intptr_t arg, int md, cred_t *cr, int *rv)
TIMER_ABSTIME : TIMER_RELTIME, &when);
timerfd_itimer_unlock(state, it);
- if (err != 0 || st.tfd_settime_ovalue == NULL)
+ if (err != 0 || st.tfd_settime_ovalue == 0)
return (err);
if ((err = timerfd_copyout(&oval, st.tfd_settime_ovalue)) != 0)
@@ -455,7 +455,7 @@ timerfd_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
}
if (ddi_create_minor_node(devi, "timerfd", S_IFCHR,
- TIMERFDMNRN_TIMERFD, DDI_PSEUDO, NULL) == DDI_FAILURE) {
+ TIMERFDMNRN_TIMERFD, DDI_PSEUDO, 0) == DDI_FAILURE) {
cmn_err(CE_NOTE, "/dev/timerfd couldn't create minor node");
ddi_soft_state_fini(&timerfd_softstate);
mutex_exit(&timerfd_lock);