From 9f72f0ee52e90fc0c25b72843f38cd0ee970bb09 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sat, 14 Nov 2015 14:56:01 +0000 Subject: [PATCH] Add NULL check to make Coverity happy. --- sys/cam/ctl/ctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 1676baecfa1c..084645ec7e3f 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -9760,7 +9760,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;