From c16199897996d6cedadb0ad5a7c2edc858fa178c Mon Sep 17 00:00:00 2001 From: mjacob Date: Thu, 21 Dec 2006 20:06:30 +0000 Subject: Pay attention to return value from xpt_bus_register in xpt_init. Obtained from: Xin Li (Coverity) MFC after: 3 days --- sys/cam/cam_xpt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/cam') 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 -- cgit v1.1