diff options
author | mjacob <mjacob@FreeBSD.org> | 2006-12-21 20:06:30 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2006-12-21 20:06:30 +0000 |
commit | c16199897996d6cedadb0ad5a7c2edc858fa178c (patch) | |
tree | 372fcbdd24a651f8c8b5ecc10d9c2979f2059d49 /sys/cam/cam_xpt.c | |
parent | c427816562e439f54793d30e6f0e60444b39fd5c (diff) | |
download | FreeBSD-src-c16199897996d6cedadb0ad5a7c2edc858fa178c.zip FreeBSD-src-c16199897996d6cedadb0ad5a7c2edc858fa178c.tar.gz |
Pay attention to return value from xpt_bus_register in xpt_init.
Obtained from: Xin Li (Coverity)
MFC after: 3 days
Diffstat (limited to 'sys/cam/cam_xpt.c')
-rw-r--r-- | sys/cam/cam_xpt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 38f97cd..7adfa2d 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -1446,7 +1446,11 @@ xpt_init(dummy) devq); xpt_max_ccbs = 16; - xpt_bus_register(xpt_sim, /*bus #*/0); + if ((status = xpt_bus_register(xpt_sim, /*bus #*/0)) != CAM_SUCCESS) { + printf("xpt_init: xpt_bus_register failed with status %#x,"; + " failing attach\n", status); + return; + } /* * Looking at the XPT from the SIM layer, the XPT is |