From 5c2def1fe977ee8010f1f89bb168ad7e84802013 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Fri, 18 Jan 2019 13:07:52 +0200 Subject: 10388 bofi: NULL pointer errors Reviewed by: Andy Fiddaman Reviewed by: Andy Stormont Reviewed by: Gergő Mihály Doma Approved by: Robert Mustacchi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/src/uts/common/io/bofi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/src/uts/common/io/bofi.c b/usr/src/uts/common/io/bofi.c index 6554d29f76..dc52302851 100644 --- a/usr/src/uts/common/io/bofi.c +++ b/usr/src/uts/common/io/bofi.c @@ -625,7 +625,7 @@ bofi_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) return (DDI_FAILURE); (void) snprintf(buf, sizeof (buf), "%s,ctl", name); if (ddi_create_minor_node(dip, buf, S_IFCHR, 0, - DDI_PSEUDO, NULL) == DDI_FAILURE) + DDI_PSEUDO, 0) == DDI_FAILURE) return (DDI_FAILURE); if (ddi_get_soft_iblock_cookie(dip, DDI_SOFTINT_MED, @@ -4478,7 +4478,7 @@ bofi_post_event(dev_info_t *dip, dev_info_t *rdip, for (lp = hp->link; lp != NULL; lp = lp->link) { ep = lp->errentp; ep->errstate.errmsg_count++; - if ((ep->errstate.msg_time == NULL || + if ((ep->errstate.msg_time == 0 || ep->errstate.severity > arg->f_impact) && (ep->state & BOFI_DEV_ACTIVE)) { ep->errstate.msg_time = bofi_gettime(); @@ -4535,7 +4535,7 @@ bofi_fm_ereport_callback(sysevent_t *ev, void *cookie) ep->errstate.errmsg_count++; if (!(ep->state & BOFI_DEV_ACTIVE)) continue; - if (ep->errstate.msg_time != NULL) + if (ep->errstate.msg_time != 0) continue; if (service_ereport) { ptr = class + strlen(service_class); -- cgit v1.2.3