kernel/u4b: sc is NULL here, so don't dereference it.
authorSascha Wildner <saw@online.de>
Thu, 28 Feb 2013 18:35:23 +0000 (19:35 +0100)
committerSascha Wildner <saw@online.de>
Thu, 28 Feb 2013 18:35:57 +0000 (19:35 +0100)
sys/bus/u4b/storage/umass.c

index deb09c4..3b9da07 100644 (file)
@@ -2269,9 +2269,9 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
        case XPT_CALC_GEOMETRY:
                /* the opcodes requiring a target. These should never occur. */
                if (sc == NULL) {
-                       DPRINTF(sc, UDMASS_GEN, "%s:%d:%d:%d:func_code 0x%04x: "
+                       DPRINTF(sc, UDMASS_GEN, "%s:xx:%d:%d:func_code 0x%04x: "
                            "Invalid target (target needed)\n",
-                           DEVNAME_SIM, cam_sim_path(sc->sc_sim),
+                           DEVNAME_SIM,
                            ccb->ccb_h.target_id, ccb->ccb_h.target_lun,
                            ccb->ccb_h.func_code);