svn commit: r290820 - head/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Sat Nov 14 14:56:02 UTC 2015


Author: mav
Date: Sat Nov 14 14:56:01 2015
New Revision: 290820
URL: https://svnweb.freebsd.org/changeset/base/290820

Log:
  Add NULL check to make Coverity happy.

Modified:
  head/sys/cam/ctl/ctl.c

Modified: head/sys/cam/ctl/ctl.c
==============================================================================
--- head/sys/cam/ctl/ctl.c	Sat Nov 14 13:34:03 2015	(r290819)
+++ head/sys/cam/ctl/ctl.c	Sat Nov 14 14:56:01 2015	(r290820)
@@ -9760,7 +9760,8 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio
 	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;


More information about the svn-src-head mailing list