summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ctl/ctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 61ba32e..eedcfa9 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -9762,7 +9762,8 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len)
desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT |
SVPD_ID_TYPE_TPORTGRP;
desc->length = 4;
- if (softc->is_single || port->status & CTL_PORT_STATUS_HA_SHARED)
+ if (softc->is_single ||
+ (port && port->status & CTL_PORT_STATUS_HA_SHARED))
g = 1;
else
g = 2 + ctsio->io_hdr.nexus.targ_port / softc->port_cnt;
OpenPOWER on IntegriCloud