svn commit: r291389 - stable/10/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Fri Nov 27 15:27:45 UTC 2015


Author: mav
Date: Fri Nov 27 15:27:43 2015
New Revision: 291389
URL: https://svnweb.freebsd.org/changeset/base/291389

Log:
  MFC r290820: Add NULL check to make Coverity happy.

Modified:
  stable/10/sys/cam/ctl/ctl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl.c	Fri Nov 27 15:26:19 2015	(r291388)
+++ stable/10/sys/cam/ctl/ctl.c	Fri Nov 27 15:27:43 2015	(r291389)
@@ -9762,7 +9762,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-all mailing list