diff options
author | mav <mav@FreeBSD.org> | 2015-11-27 15:27:43 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-11-27 15:27:43 +0000 |
commit | 5d2678aa7dbbbcad3ffb657473eeefd8e14fdb05 (patch) | |
tree | 53da0943f256d9fa8230bcb956fc4df29fc2903e | |
parent | 83190a6afe7b3cb27ca4e76d4a3c660a0c9a466a (diff) | |
download | FreeBSD-src-5d2678aa7dbbbcad3ffb657473eeefd8e14fdb05.zip FreeBSD-src-5d2678aa7dbbbcad3ffb657473eeefd8e14fdb05.tar.gz |
MFC r290820: Add NULL check to make Coverity happy.
-rw-r--r-- | sys/cam/ctl/ctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |