From 5f060f5100426465bddc18c6f81b146ccee30eb8 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Mon, 21 Jan 2019 20:07:11 +0200 Subject: 11120 libpcidb: NULL pointer errors Reviewed by: Peter Tribble Approved by: Dan McDonald --- usr/src/lib/libpcidb/common/pcidb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/src/lib/libpcidb/common/pcidb.c b/usr/src/lib/libpcidb/common/pcidb.c index 2d3babec90..ec1e8526d6 100644 --- a/usr/src/lib/libpcidb/common/pcidb.c +++ b/usr/src/lib/libpcidb/common/pcidb.c @@ -90,7 +90,7 @@ struct pcidb_device { struct pcidb_vendor { uint16_t pv_id; - char pv_name[PCI_NAME_MAX]; + char pv_name[PCI_NAME_MAX]; struct pcidb_device *pv_dstart; struct pcidb_device *pv_dend; struct pcidb_vendor *pv_prev; @@ -278,7 +278,7 @@ newstate: case PDB_VENDOR: v = parse_vendor(buf, hdl); if (v == NULL) - return (NULL); + return (0); state = PDB_DEVICE; continue; case PDB_DEVICE: @@ -295,7 +295,7 @@ newstate: assert(v != NULL); d = parse_device(buf, v); if (d == NULL) - return (NULL); + return (0); continue; case PDB_SUBDEV: if (buf[0] != '\t') { -- cgit v1.2.3