[Midnightbsd-cvs] src [8242] trunk/sys/cam/cam_xpt.c: really handle xp_compile_path error
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Sep 17 17:32:10 EDT 2016
Revision: 8242
http://svnweb.midnightbsd.org/src/?rev=8242
Author: laffer1
Date: 2016-09-17 17:32:10 -0400 (Sat, 17 Sep 2016)
Log Message:
-----------
really handle xp_compile_path error
Modified Paths:
--------------
trunk/sys/cam/cam_xpt.c
Modified: trunk/sys/cam/cam_xpt.c
===================================================================
--- trunk/sys/cam/cam_xpt.c 2016-09-17 21:31:43 UTC (rev 8241)
+++ trunk/sys/cam/cam_xpt.c 2016-09-17 21:32:10 UTC (rev 8242)
@@ -3898,8 +3898,11 @@
status = xpt_compile_path(path, /*periph*/NULL, sim->path_id,
CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD);
- if (status != CAM_REQ_CMP)
- printf("xpt_compile_path returned %d\n", status);
+ if (status != CAM_REQ_CMP) {
+ xpt_release_bus(new_bus);
+ free(path, M_CAMXPT);
+ return (CAM_RESRC_UNAVAIL);
+ }
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
cpi.ccb_h.func_code = XPT_PATH_INQ;
More information about the Midnightbsd-cvs
mailing list