diff options
author | Scott Long <scottl@FreeBSD.org> | 2018-01-09 00:00:55 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2018-01-09 00:00:55 +0000 |
commit | 329e7a8b51e0f6a9e621d6a812cc1b6081ad8474 (patch) | |
tree | dc998abbb3c30f4cfade11ff0d89937cea62a204 /sys/cam/cam_periph.h | |
parent | 78f57a9cdef729f94669fe1eb494666f403f9235 (diff) | |
download | src-329e7a8b51e0f6a9e621d6a812cc1b6081ad8474.tar.gz src-329e7a8b51e0f6a9e621d6a812cc1b6081ad8474.zip |
Notes
Diffstat (limited to 'sys/cam/cam_periph.h')
-rw-r--r-- | sys/cam/cam_periph.h | 5 |
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) \ |