From 5d2678aa7dbbbcad3ffb657473eeefd8e14fdb05 Mon Sep 17 00:00:00 2001 From: mav Date: Fri, 27 Nov 2015 15:27:43 +0000 Subject: MFC r290820: Add NULL check to make Coverity happy. --- sys/cam/ctl/ctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/cam') 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; -- cgit v1.1