From: jsg Date: Sun, 3 May 2015 02:10:13 +0000 (+0000) Subject: add missing CISS_UNLOCK_SCRATCH/splx calls X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3de5a4d1b49a07136596e162367abd72b791c980;p=openbsd add missing CISS_UNLOCK_SCRATCH/splx calls ok krw@ --- 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;