aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/cam_periph.h
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2018-01-09 00:00:55 +0000
committerScott Long <scottl@FreeBSD.org>2018-01-09 00:00:55 +0000
commit329e7a8b51e0f6a9e621d6a812cc1b6081ad8474 (patch)
treedc998abbb3c30f4cfade11ff0d89937cea62a204 /sys/cam/cam_periph.h
parent78f57a9cdef729f94669fe1eb494666f403f9235 (diff)
downloadsrc-329e7a8b51e0f6a9e621d6a812cc1b6081ad8474.tar.gz
src-329e7a8b51e0f6a9e621d6a812cc1b6081ad8474.zip
Notes
Diffstat (limited to 'sys/cam/cam_periph.h')
-rw-r--r--sys/cam/cam_periph.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/cam/cam_periph.h b/sys/cam/cam_periph.h
index a8f487400b6f..c48ed865cde7 100644
--- a/sys/cam/cam_periph.h
+++ b/sys/cam/cam_periph.h
@@ -202,7 +202,10 @@ int cam_periph_error(union ccb *ccb, cam_flags camflags,
static __inline struct mtx *
cam_periph_mtx(struct cam_periph *periph)
{
- return (xpt_path_mtx(periph->path));
+ if (periph != NULL)
+ return (xpt_path_mtx(periph->path));
+ else
+ return (NULL);
}
#define cam_periph_owned(periph) \