summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ciss.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/ciss.c')
-rw-r--r--sys/dev/ic/ciss.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index ac44ea60c2a..fc3bf1f896b 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.72 2015/03/14 03:38:47 jsg Exp $ */
+/* $OpenBSD: ciss.c,v 1.73 2015/05/03 02:10:13 jsg Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -756,8 +756,10 @@ ciss_ldmap(struct ciss_softc *sc)
total = sizeof(*lmap) + (sc->maxunits - 1) * sizeof(lmap->map);
ccb = scsi_io_get(&sc->sc_iopool, SCSI_POLL|SCSI_NOSLEEP);
- if (ccb == NULL)
+ if (ccb == NULL) {
+ CISS_UNLOCK_SCRATCH(sc, lock);
return ENOMEM;
+ }
ccb->ccb_len = total;
ccb->ccb_data = lmap;
@@ -800,8 +802,10 @@ ciss_sync(struct ciss_softc *sc)
flush->flush = sc->sc_flush;
ccb = scsi_io_get(&sc->sc_iopool, SCSI_POLL|SCSI_NOSLEEP);
- if (ccb == NULL)
+ if (ccb == NULL) {
+ CISS_UNLOCK_SCRATCH(sc, lock);
return ENOMEM;
+ }
ccb->ccb_len = sizeof(*flush);
ccb->ccb_data = flush;