Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Nov 2015 15:27:43 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r291389 - stable/10/sys/cam/ctl
Message-ID:  <201511271527.tARFRhWK070180@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511271527.tARFRhWK070180>